Add the following to /etc/docker/daemon.json
:
{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64"
}
Now systemctl restart docker
. Validate with ss -tlnp
:
# ss -tlnp
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=484,fd=3))
LISTEN 0 5 127.0.0.1:631 0.0.0.0:* users:(("cupsd",pid=472,fd=7))
LISTEN 0 128 0.0.0.0:7000 0.0.0.0:* users:(("docker-proxy",pid=5125,fd=4))
LISTEN 0 128 0.0.0.0:7001 0.0.0.0:* users:(("docker-proxy",pid=5105,fd=4))
LISTEN 0 128 0.0.0.0:7002 0.0.0.0:* users:(("docker-proxy",pid=5087,fd=4))
LISTEN 0 128 0.0.0.0:7003 0.0.0.0:* users:(("docker-proxy",pid=5067,fd=4))
LISTEN 0 128 0.0.0.0:7004 0.0.0.0:* users:(("docker-proxy",pid=5048,fd=4))
LISTEN 0 128 0.0.0.0:7005 0.0.0.0:* users:(("docker-proxy",pid=5027,fd=4))
LISTEN 0 128 [::]:22 [::]:* users:(("sshd",pid=484,fd=4))
LISTEN 0 5 [::1]:631 [::]:* users:(("cupsd",pid=472,fd=6))
LISTEN 0 128 [::]:7000 [::]:* users:(("docker-proxy",pid=5131,fd=4))
LISTEN 0 128 [::]:7001 [::]:* users:(("docker-proxy",pid=5113,fd=4))
LISTEN 0 128 [::]:7002 [::]:* users:(("docker-proxy",pid=5093,fd=4))
LISTEN 0 128 [::]:7003 [::]:* users:(("docker-proxy",pid=5072,fd=4))
LISTEN 0 128 [::]:7004 [::]:* users:(("docker-proxy",pid=5055,fd=4))
LISTEN 0 128 [::]:7005 [::]:* users:(("docker-proxy",pid=5033,fd=4))