-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port API: support specifying IP version explicitly ("tcp4", "tcp6") #231
Comments
Implementing this is straightforward for Should |
Fix rootless-containers#231 Signed-off-by: Akihiro Suda <[email protected]>
Fix rootless-containers#231 Signed-off-by: Akihiro Suda <[email protected]>
Fix rootless-containers#231 Signed-off-by: Akihiro Suda <[email protected]>
It's tricky; so before docker 20.10, publishing a port to listen on "any" IP ( That most likely was an oversight in the original implementation; docker 20.10 "fixed" that, by no longer publishing on IPv6 by default, but there's many people relying on the (faulty?) behaviour, and assume that The libnetwork update attempts to fix the situation, but instead of "implicitly" exposing both on IPv4 and IPv6 now explicitly exposes on both, which shows both in I'm a bit on the fence what the best solution is (also a bit worried about (by default) starting two proxies now, as there could be a non-neglectible overhead in that) |
Fix rootless-containers#231 Signed-off-by: Akihiro Suda <[email protected]>
The `-proto` argument of `docker-proxy` is like "tcp", but we need to convert it to "tcp4" or "tcp6" explicitly when calling RootlessKit API, for libnetwork >= 20201216. If the port driver does not support "tcp6" (especially when the port driver is slirp4netns), `rootlesskit-docker-proxy` skips exposing the port via RootlessKit API, without showing an error. (We can't raise an error here, because `docker run -p 8080:80` always causes `rootlesskit-docker-proxy -host-ip ::` as well as `r-d-p -h-i 0.0.0.0`) See https://github.com/moby/libnetwork/pull/2604/files#diff-8fa48beed55dd033bf8e4f8c40b31cf69d0b2cc5d4bb53cde8594670ea6c938aR20 See also rootless-containers#231 Using this version of `rootlesskit-docker-proxy` with libnetwork < 20201216 is also fine, because Rootless Docker had never officially supported IPv6. Signed-off-by: Akihiro Suda <[email protected]>
Opened PR #232 When the port driver is set to slirp4netns, The default port driver |
Fix rootless-containers#231 Signed-off-by: Akihiro Suda <[email protected]>
The `-proto` argument of `docker-proxy` is like "tcp", but we need to convert it to "tcp4" or "tcp6" explicitly when calling RootlessKit API, for libnetwork >= 20201216. If the port driver does not support "tcp6" (especially when the port driver is slirp4netns), `rootlesskit-docker-proxy` skips exposing the port via RootlessKit API, without showing an error. (We can't raise an error here, because `docker run -p 8080:80` always causes `rootlesskit-docker-proxy -host-ip ::` as well as `r-d-p -h-i 0.0.0.0`) See https://github.com/moby/libnetwork/pull/2604/files#diff-8fa48beed55dd033bf8e4f8c40b31cf69d0b2cc5d4bb53cde8594670ea6c938aR20 See also rootless-containers#231 Using this version of `rootlesskit-docker-proxy` with libnetwork < 20201216 is also fine, because Rootless Docker had never officially supported IPv6. Signed-off-by: Akihiro Suda <[email protected]>
The new version of Docker libnetwork executes two proxy commands: moby/moby#41908 (comment)
rootlesskit-docker-proxy
now fails with EADDRINUSE bcause it cause the equivalent ofrootlessctl add-ports 0.0.0.0:8080:80/tcp [::]:8080:80/tcp
rootlesskit-docker-proxy
probably needs to be modified to causerootlessctl add-ports 0.0.0.0:8080:80/tcp4 [::]:8080:80/tcp6
cc @thaJeztah @arkodg
The text was updated successfully, but these errors were encountered: