mirror of
https://github.com/containers/podman.git
synced 2025-09-21 03:35:06 +08:00
add hostname to network alias
We use the name as alias but using the hostname makes also sense and this is what docker does. We have to keep the short id as well for docker compat. While adding some tests I removed some duplicated tests that were executed twice for nv for no reason. Fixes #17370 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -282,8 +282,7 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
|
||||
return nil, errors.New("failed to find free network interface name")
|
||||
}
|
||||
}
|
||||
// always add the short id as alias for docker compat
|
||||
opts.Aliases = append(opts.Aliases, ctr.config.ID[:12])
|
||||
opts.Aliases = append(opts.Aliases, getExtraNetworkAliases(ctr)...)
|
||||
|
||||
normalizeNetworks[netName] = opts
|
||||
}
|
||||
|
Reference in New Issue
Block a user