Docker Community Forums

Share and learn in the Docker community.

IPv6 completely broken on docker

It has been about 8 hours, and IPv6 configuration is still a mess. So here’s the situation:

  • We have an IPv6-only host running Ubuntu 21.04
  • We need to enable IPv6 on the containers

The big trouble is, the documentation is heavily misleading. It says nothing about what cidr we should set and so on.
System meta

  • uname -a: Linux skyvm 5.8.0-55-generic #62-Ubuntu SMP Tue Jun 1 08:20:36 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
  • docker --version: Docker version 20.10.7, build f0df350
  • containerd --version: containerd containerd[dot]io 1.4.6 d71fcd7d8303cbf684402823e425e9dd2e99285d
  • dockerd --version: Docker version 20.10.7, build b0f5bc3

This is what our /etc/docker/daemon.json looks like:

{
  "ipv6": true,
  "fixed-cidr-v6": "fd00::/80",
  "userland-proxy": false
}

The trouble

  • docker network create --ipv6:
    docker network create --ipv6 foo Error response from daemon: could not find an available, non-overlapping IPv6 address pool among the defaults to assign to the network
    
  • docker run -it debian ping g.co:
    ping: g.co: Temporary failure in name resolution
    

On the contrary, running ping g.co from the host gives this:

PING g.co(zrh04s15-in-x0e.1e100.net (2a00:1450:400a:803::200e)) 56 data bytes
64 bytes from zrh04s15-in-x0e.1e100.net (2a00:1450:400a:803::200e): icmp_seq=1 ttl=117 time=39.7 ms
64 bytes from zrh04s15-in-x0e.1e100.net (2a00:1450:400a:803::200e): icmp_seq=2 ttl=117 time=39.8 ms
^C
--- g.co ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 39.716/39.743/39.770/0.027 ms

Attempted solutions
Used this image which didn’t do much, unfortunately.