I'm using docker-compose for managing containers.
How to I turn off iptables (set --iptables=false for docker) when starting via docker-compose up?
Docker installs two custom iptables chains named DOCKER-USER and DOCKER , and it ensures that incoming packets are always checked by these two chains first. All of Docker's iptables rules are added to the DOCKER chain. Do not manipulate this chain manually.
We simply need to set the http_proxy and https_proxy environmental variables during build time. We can do this with the docker build command itself. $ sudo docker build -t curl --build-arg http_proxy=http://192.168.33.10:3128 . Or we can specify the http_proxy value using the ENV instruction within the Dockerfile .
The --iptables
option only applies to the Docker daemon; it's not a per-container option. The corollary is that this isn't something you could ever set from your docker-compose.yaml
file.
You would need to modify the options passed to the Docker daemon; on Red Hat systems and derivatives this means you would modify /etc/sysconfig/docker
and updte the OPTIONS=
line (and restart Docker). There will be a similar process for other distributions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With