Hello, after many hours of browsing github issues and encountering various bugs and misconfigurations, I was able to get docker + docker-compose work with ipv6. I think you should update your post to reflect the latest changes.
With docker 20.10.5 and docker-compose 1.28.6 you don't need to use the ip6tables commands manually and docker can take care of doing the NAT properly (which is MUCH better!).
For that you need to have "experimental": true in /etc/docker/daemon.json, along with "ip6tables": true. Then restart docker service and check it has an ipv6 on docker0 bridge.
I have found that for the network part in the docker-compose.yml file, you need to omit the "gateway" part (last line).
After that, all should work nicely :D.
Side note: if you're using HAProxy, use bind :::80 v4v6. Nothing needs to be changed for exposed ports, it'll listen on both.
Hello, after many hours of browsing github issues and encountering various bugs and misconfigurations, I was able to get docker + docker-compose work with ipv6. I think you should update your post to reflect the latest changes.
With docker 20.10.5 and docker-compose 1.28.6 you don't need to use the ip6tables commands manually and docker can take care of doing the NAT properly (which is MUCH better!).
For that you need to have
"experimental": true
in/etc/docker/daemon.json
, along with"ip6tables": true
. Then restart docker service and check it has an ipv6 on docker0 bridge.I have found that for the network part in the docker-compose.yml file, you need to omit the "gateway" part (last line).
After that, all should work nicely :D.
Side note: if you're using HAProxy, use
bind :::80 v4v6
. Nothing needs to be changed for exposed ports, it'll listen on both.That's awesome. Thanks for sharing that update. I'll add it to the post when I get close to a computer.
ping ;)
Sorry, I wasn't able to get this to work on Mac and haven't had a chance to test this on Linux just yet. It's on my laundry of TODO items. :-)