diff options
Diffstat (limited to 'tools/vm/ubuntu1604')
-rwxr-xr-x | tools/vm/ubuntu1604/25_docker.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/vm/ubuntu1604/25_docker.sh b/tools/vm/ubuntu1604/25_docker.sh index 11eea2d72..53d8ca588 100755 --- a/tools/vm/ubuntu1604/25_docker.sh +++ b/tools/vm/ubuntu1604/25_docker.sh @@ -52,3 +52,14 @@ while true; do exit $result fi done + +# Enable Docker IPv6. +cat > /etc/docker/daemon.json <<EOF +{ + "fixed-cidr-v6": "2001:db8:1::/64", + "ipv6": true +} +EOF +# Docker's IPv6 support is lacking and does not work the same way as IPv4. We +# can use NAT so containers can reach the outside world. +ip6tables -t nat -A POSTROUTING -s 2001:db8:1::/64 ! -o docker0 -j MASQUERADE |