Giter Club home page Giter Club logo

Comments (1)

blixten85 avatar blixten85 commented on June 20, 2024

For those who want to add this meanwhile we wait

sudo nano /etc/docker/daemon.json

{
  "ipv6": true,
  "fixed-cidr-v6": "fd00::/64",
  "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": "fd00::/104", "size": 112 }
  ]
}

nano ~/.docker/compose/docker-compose.override.yml

networks:
  default:
    name: compose_default
    enable_ipv6: true
    ipam:
      driver: default
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1
        - subnet: fd01::/64
          gateway: fd01::1

ds -c down
sudo reboot
ds -c down
ds -c p
ds -c up

These commands, in this order should do the trick.
The reason why you want to reboot is because the network might still be in use and not fully shutdown, after the reboot is done make sure the compose_default network is down with ds -c down and then ds -c p to prune all the containers including the network.
Rebuild everything and bring it back up again with the ds -c up command.

Add the following to the container you want ipv6 to be working for.
This goes into ~/.docker/compose/docker-compose.override.yml file.

    sysctls:
      - net.ipv6.conf.all.disable_ipv6=0
      - net.ipv6.conf.eth0.proxy_ndp=1

i.e (full copy off my gluetun container with network added)

services:
  gluetun:
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
     - ${QBITTORRENT_PORT_51413}:51413
     - ${QBITTORRENT_PORT_51413}:51413/udp
     - ${QBITTORRENT_PORT_6881}:6881
     - ${QBITTORRENT_PORT_6881}:6881/udp
     - ${QBITTORRENT_PORT_8080}:8080
     - ${AUTOBRR_PORT_7474}:7474
    environment:
      - VPN_SERVICE_PROVIDER=custom
      - VPN_TYPE=wireguard
      - OPENVPN_USER=username
      - OPENVPN_PASSWORD=password
      - OPENVPN_CUSTOM_CONFIG=/config/wg0.conf
      - DOT=on
      - BLOCK_ADS=on
      - BLOCK_MALICIOUS=on
      - BLOCK_SURVEILLANCE=on
      - VPN_ENDPOINT_IP=94.254.51.197
      - VPN_ENDPOINT_PORT=48575
      - WIREGUARD_PUBLIC_KEY=public_hash_key
      - WIREGUARD_PRIVATE_KEY=private_hash_key
      - WIREGUARD_PRESHARED_KEY=
      - WIREGUARD_ADDRESSES=10.0.66.115/24,fdab:1337:1337:66::115/64
      - WIREGUARD_ALLOWED_IPS=0.0.0.0/0,::/0
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=0
      - net.ipv6.conf.eth0.proxy_ndp=1

networks:
  default:
    name: compose_default
    enable_ipv6: true
    ipam:
      driver: default
      config:
        - subnet: 172.18.0.0/16
          gateway: 172.18.0.1
        - subnet: fd01::/64
          gateway: fd01::1

from dockstarter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.