Skip to content

Docker Installation

Nativ IPv6

To enable Experimantel IPv6 Support create the file /etc/docker/daemon.json with the following content.

{
  "ipv6": true,
  "fixed-cidr-v6": "2001:780:250:9::/80",
  "experimental": true,
  "ip6tables": true,
  "default-address-pools": [
    {
      "base": "172.17.0.0/16",
      "size": 16
    },
    {
      "base": "172.18.0.0/16",
      "size": 16
    },
    {
      "base": "172.19.0.0/16",
      "size": 16
    },
    {
      "base": "172.20.0.0/14",
      "size": 16
    },
    {
      "base": "172.24.0.0/14",
      "size": 16
    },
    {
      "base": "172.28.0.0/14",
      "size": 16
    },
    {
      "base": "192.168.0.0/16",
      "size": 20
    },
    {
      "base": "2001:780:250:9::/64",
      "size": 80
    }
  ]
}

Test IPv6 connection with ping.

docker run --rm -it debian ping6 google.com -c3

Use with docker-compose

networks:
  default:
    enable_ipv6: true
    ipam:
      driver: default
      config:
        - subnet: 2001:780:250:9:ffff::/80
          gateway: 2001:780:250:9:ffff::1

Debian

Docker Engine

sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
# Add Docker GPG Key
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg
# Add apt source
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/docker.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Docker-Compose

apt install -y python3 python3-pip
python3 -m pip install docker-compose

Alpine

Docker Engine

apk update
apk add docker
# Enable Autostart
rc-update add docker boot
service docker start

Docker-Compose

apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev make
python3 -m pip install docker-compose