summaryrefslogtreecommitdiff
path: root/libpod/network
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/network
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/network')
-rw-r--r--libpod/network/types/network.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/network/types/network.go b/libpod/network/types/network.go
index 68a32d499..2fe4f3da2 100644
--- a/libpod/network/types/network.go
+++ b/libpod/network/types/network.go
@@ -151,7 +151,9 @@ type PerNetworkOptions struct {
// StaticIPv4 for this container. Optional.
StaticIPs []net.IP `json:"static_ips,omitempty"`
// Aliases contains a list of names which the dns server should resolve
- // to this container. Can only be set when DNSEnabled is true on the Network.
+ // to this container. Should only be set when DNSEnabled is true on the Network.
+ // If aliases are set but there is no dns support for this network the
+ // network interface implementation should ignore this and NOT error.
// Optional.
Aliases []string `json:"aliases,omitempty"`
// StaticMac for this container. Optional.