Vendor in Libnetwork changes#41805
Conversation
Brings in moby/libnetwork#2604 Signed-off-by: Arko Dasgupta <[email protected]>
|
Am I correct in understanding that this should resolve #41822? |
|
yes @nightah this PR should solve your issue |
|
PTAL @tiborvass @thaJeztah |
|
The solution of this issue has created a problem - at least on my -side: creating a container with option On occasions it assigns these automatic ports to different port numbers on IPv4 and IPv6 - see https://forums.docker.com/t/why-different-port-number-is-mapped-on-ipv4-and-ipv6-address-for-same-expose-port/109795 This is a problem - at least when using the classic swarm - which seems to think that the IPv6 port is an IPv4 port. When the ports are not in sync it occurs, that, when several container with this issue are created, the IPV4 ports overlap on the swarm endpoint. Long story short: before 20.10.2 there was no automatic IPv6 assignment using -P or -p 80. Now there is. Is that intended behavior? If so: how can it be disabled without loosing IPv6 inside the container? |
|
Older releases implicitly bound ports on both IPv4 and IPv6. 20.10 includes that information in the API.
That's unlikely to be fixed, with classic swarm being deprecated. for the IPv4 and IPv6 ports not being the same when using random / ephemeral port assignment, there's this ticket; #42442 (feel free to participate in the discussion there; contributions welcome as well of course 😅) Not sure if it helps as a workaround, but if you know which ports should be mapped, you can use docker run -d -p 0.0.0.0::80 --name foobar nginx:alpine
docker port foobar 80
0.0.0.0:49155 |
|
Thanks for the elaborate explanation! I did not know about the I'll also check the mentioned issue! |
|
Yeah, the Being explicit is more work, but makes sure that you know what ports will be published, and keeps you in control whether or not a port should be published. Publishing a port makes it publicly accessible and in many situations (e.g. mysql port |
Brings in moby/libnetwork#2604
fixes #41822 "Upgrade to 20.10 fails to release ports published to IPv6 literal addresses"