-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README Question: Using image/image inside #61
Comments
@johntdavis84 Using IPv6 with Docker is not as simple as it should be, thats right.
The equivalent compose subtree for the Docker-Run-Command: version: '3.3'
services:
ipv6nat:
container_name: ipv6nat
privileged: true
network_mode: host
restart: unless-stopped
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '/lib/modules:/lib/modules:ro'
image: robbertkl/ipv6nat (You might want to check Composerize.
This depends on how you want to run and deploy Docker-IPv6 NAT. If you run it by creating a docker container with I always run Docker-IPv6 as a system service - so no container, directly on the host - as Docker-IPv6 NAT is more or less an additional service to provide an infrastructure to use and deploy containers. The AUR package (which I currenty maintain) only supports |
@johntdavis84 The AUR package is now also available for |
Awesome @bephinix ! |
@bephinix & @robbertkl Good morning! Thanks so much for your replies. @bephinix , I can't say how much I appreciate taking time to publish a new version of the AUR package. I've been going slowly mad trying to do it by hand--but at least I understand a lot more about how v6 and docker work now. Thank you! One last question: I am assuming, but not 100 percent sure, that I need to keep the daemon.json commands to actually enable IPv6 at all. Is that correct?
"Not as simple as it should be" is a much more circumspect than I ended up being over here. I tried to point out what I felt were some more shortcomings of the builtin v6 features. Maybe some of my rambling might be useful in the readme description of why this package is so useful? docker/docs#6075 (comment) Admittedly, I was pretty frustrated at that point, having spent hours and days to even realize the docker documentation wasn't actually complete and then dig around to try to get it up and running. I eventually found this ( https://medium.com/@skleeschulte/how-to-enable-ipv6-for-docker-containers-on-ubuntu-18-04-c68394a219a2 ). That all made sense and worked but was way too much work. I found myself trying to learn bash scripting Thursday night to automatically run the ip6tables commands at boot to manually route the pihole and default networks, and realized I needed to try something different. |
@johntdavis84 If you want to enable IPv6 on your default Dual-Stack for containers are not as common as one might think; most of the time only the ingress itself uses dual-stack and all other internal containers and services use IPv4 or IPv6. AFAIK Kubernetes is currently implementing/testing IPv6, maybe Docker will also update their IPv6 support. (I wrote a Tutorial for a Hosting Provider which might be useful if you ever want to run IPv4+IPv6 Docker on recent Debian machines.) Let us know, when your IPv6-NAT deployments is up and running. 😄 |
@bephinix is there a good reason to enable v6 on the default bridge? My understanding (so far) is that regularly using the default bridge for anything when there's a container with its own network available has negative security implications. I understand that it's not a common use case, though I'm definitely surprised that the current docker documentation does not actually explain how to get a dual-stack container (or even a single stack v6 container) up and running. The closest I got was using Skleeschulte's Medium article, and even then he convinced me that the far superior solution was to use the What got me diving head first down this rabbit hole to begin with was noticing the default I'm about to try to install it now. I'll let you know how it goes. EDIT: I still need to update the Thanks again for all your help. |
@bephinix , thanks again for your help. I'm able to bring up the docker-compose.yml powered container, using the
That all seems to be working as intended, but then I get the following when I try to inspect the network it creates. It's not enabling IPv6, and the image does not appear to receive a v6 address at all. Do I need to manually create the network with a docker command before bringing up the container to ensure it gets an address? Right now I'm relying on docker-compose to automatically create it, and if it doesn't know about the ipv6nat add-on it makes sense that it wouldn't do anything. OR: Do I need to set the pihole service's "network_mode" to "host," similar to your containerized, non-systemd service example above?
|
Exactly, simply use custom created bridges all the time. 👍
You do not have. It is possible to create an bridge network with IPv6 via docker compose, although you may need to use v2 of docker compose files. The bridge or docker compose do not need to known about Docker-IPv6-NAT, as IPv6-NAT simply monitors active docker networks via the docker socket and creates and removes IPTables rules accordingly.
I am running Pi-Hole and a few other services on my Raspberry Pi 4. Pi-Hole uses the network stack of the docker host and all the other services will use a custom bridge network. |
I've added I'm realizing starting my docker adventure with pihole was likely not the best idea. The pihole docs make it sound super-simple, but to even get it to come up on Manjaro Linux I had to make the pihole container
So, that's why letting it set up a bridge mode network failed to assign an IPv6 address? Since it was just blank, I wasn't sure if the ipv6nat service might be malfunctioning or something. Even the default In In any case, at least it's working now. 🌵 What other services do you run? Could you recommend one for me to use to test to make sure bridge networking is working as expected? |
@johntdavis84 At the moment, only Pi-Hole is running on the PI. You might want to use any simple container like NGINX and a default Debian container to test your bridge networking. @robbertkl I think, we can close this Issue. |
Hello,
Thanks for putting so much effort into the README. It explains both the problem and solution, and quite a bit about how all this actually works.
I've been trying to set up pihole with v6 support for a few weeks now (I tinker with it at night), and have mostly been stunned at how underdeveloped docker's v6 support is--even the documentation is incomplete.
I was definitely very happy to find your software and instructions, and I'd like to try to roll it out with pihole.
I do have a couple questions about the documentation.
docker-compose
(I'm a docker-noob, so I'm very much into compose files right now). Could you please add an example compose file equivalent to the exampledocker run
command? At the moment, I'm trying to figure out how to roll this into my compose file for pihole. I'm studying this example: https://palant.info/2018/01/05/getting-published-docker-container-ports-to-work-with-ipv6/ .docker run
or load the image into a multi-image container indocker-compose
. I'm less clear on the advantage of installing the system service--I'm guessing it obviates the need to manually set up the v6 routing in therun
command or thedocker-compose
file? Somehow? (I've also never used the AUR, so there's that.)Thanks!
The text was updated successfully, but these errors were encountered: