Allow docker to use IPV6 network.
This solution is not working in my network that parent router may have firewall that make my device unable to get connection automatically, details checkout to my ipv6 network issue
1 Check docker IPV6 is enabled
2 Get ipv6 address range in host
ip -6 route show
3 Enable IPV6 in docker
There are 2 ways to enable
3.1 1. Enable IPV6 in docker configuration
Edit docker configuration file /etc/docker/daemon.json
.
Assume the ipv6 address range is 2400::/64
.
{
"ipv6": true,
"fixed-cidr-v6": "2400::/64",
"ip6tables": true # default is true
}
3.1.1 Restart docker service
systemctl restart docker
3.2 2. Enable IPV6 in docker compose file
networks:
ip6net:
enable_ipv6: true
ipam:
config:
- subnet: 2400::/64
4 Problem
- old docker version does not support IPV6
- solution: upgrade
- It does not work
- no solution yet