Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
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.
–
–
Could check out saltstack if you're looking for this level of automation. They have a dockerng state which allows you to specify options.
https://docs.saltstack.com/en/latest/ref/states/all/salt.states.dockerng.html
Thanks for contributing an answer to Stack Overflow!
-
Please be sure to
answer the question
. Provide details and share your research!
But
avoid
…
-
Asking for help, clarification, or responding to other answers.
-
Making statements based on opinion; back them up with references or personal experience.
To learn more, see our
tips on writing great answers
.