Skip to content

Commit

Permalink
edit ip6: enable ip6 in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ntn888 committed Sep 16, 2023
1 parent 89f77a5 commit 0fc2c6d
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion _posts/misc/2023-09-16-ipv6_box.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,41 @@ sudo systemctl restart networking

Now our box is back to IPv6 only state.

One downside with this system is that you can't implement auto update of docker images using watchtower. Since once again some of the docker registeries are inaccessible.

> One downside with this system is that you can't implement auto update of docker images using watchtower. Since once again some of the docker registeries are inaccessible.
One last concern is that you need to enable IPv6 networking in docker so that the containers can reach the outside world. This is explained in [Enable IPv6 support](https://docs.docker.com/config/daemon/ipv6/). Basically you have to edit the file `/etc/docker/daemon.json`.

Once that's done you need to create a new IPv6 network and use that with your containers. Here's a sample compose file to run the qBittorrent image:

```
version: "3"
services:
qbittorrent:
image: ghcr.io/hotio/qbittorrent
container_name: qbittorrent
networks:
- ip6net # <---- add the container to the network
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- WEBUI_PORT=8080
volumes:
- /home/ajit/.config/appdata/qbtorrent:/config
- /home/ajit/downloads:/downloads
ports:
- 8080:8080
- 6881:6881
- 6881:6881/udp
restart: unless-stopped
networks:
ip6net:
enable_ipv6: true
ipam:
config:
- subnet: 2001:0DB8::/112
```

0 comments on commit 0fc2c6d

Please sign in to comment.