IPv6 not working inside a container


#1

It looks like there’s no IPv6 support enabled with Fedora docker containers by default on Fedora 29 Server.

This doc …


… says I need to both modify /etc/docker/daemon.json and also add --ipv6 to /usr/lib/systemd/system/docker.service and then reload and restart. But after doing that, it still isn’t working.

Host:

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether b8:ae:ed:77:ea:51 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.250/24 brd 10.0.0.255 scope global dynamic noprefixroute enp3s0
       valid_lft 604187sec preferred_lft 604187sec
    inet6 2601:282:700:8c78:3cef:4672:2da9:af30/64 scope global dynamic noprefixroute 
       valid_lft 228262sec preferred_lft 228262sec
    inet6 fe80::91f1:7594:6bae:99ea/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 8a:91:2d:9c:69:3e brd ff:ff:ff:ff:ff:ff
36: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:c4:b0:b5:60 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever

For connection 36, I’m expecting to see inet6 fe80::/10 or maybe fe80::1 which is what this other doc says

Inside of the docker container:

$ sudo docker run debian ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
37: eth0@if38: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.17.0.2/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:acff:fe11:2/64 scope link tentative 
       valid_lft forever preferred_lft forever

Looks like the contain lo device has both link local addresses for ipv4 and ipv6. But if the docker0 bridge on the host has no inet6 address at all, it seems this is not getting bridged correctly.

Any suggestions? (The long version of what I’m trying to do is this bug:)