aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-09-27 09:50:07 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-09-28 13:40:22 +0200
commit05614ee139b9d5ce6d2daed50d9f0b3ed6d4e9a1 (patch)
tree09d2a8deee119a69344cd5f2772ab34292d8e37d /libpod/container_internal_linux.go
parente27470ba97ae3dda32fb06b408da786f2b25a25d (diff)
downloadpodman-05614ee139b9d5ce6d2daed50d9f0b3ed6d4e9a1.tar.gz
podman-05614ee139b9d5ce6d2daed50d9f0b3ed6d4e9a1.tar.bz2
podman-05614ee139b9d5ce6d2daed50d9f0b3ed6d4e9a1.zip
always add short container id as net alias
This matches what docker does. Also make sure the net aliases are also shown when the container is stopped. docker-compose uses this special alias entry to check if it is already correctly connected to the network. [1] Because we do not support static ips on network connect at the moment calling disconnect && connect will loose the static ip. Fixes #11748 [1] https://github.com/docker/compose/blob/0bea52b18dda3de8c28fcfb0c80cc08b8950645e/compose/service.py#L663-L667 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index dd6f3878a..867ecc2ad 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -1310,7 +1310,7 @@ func (c *Container) restore(ctx context.Context, options ContainerCheckpointOpti
if err == nil && options.Name == "" && (!options.IgnoreStaticIP || !options.IgnoreStaticMAC) {
// The file with the network.status does exist. Let's restore the
// container with the same networks settings as during checkpointing.
- aliases, err := c.runtime.state.GetAllNetworkAliases(c)
+ aliases, err := c.GetAllNetworkAliases()
if err != nil {
return err
}