User Tools

Site Tools


software:docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
software:docker [2020/06/21 07:16] – created Michele Porellisoftware:docker [2023/04/30 15:15] (current) – Michele Porelli
Line 4: Line 4:
 Docker sets a lot of automatic rules in your iptables. If you use a network bridge on your Linux box, you may want to change add an additional rule to avoid traffic generated on your bridge from being discarded by Docker. Docker sets a lot of automatic rules in your iptables. If you use a network bridge on your Linux box, you may want to change add an additional rule to avoid traffic generated on your bridge from being discarded by Docker.
 <code> <code>
-EDITOR=vim sudo -E systemctl edit docker+$ EDITOR=vim sudo -E systemctl edit docker
 </code> </code>
 <code> <code>
 [Service] [Service]
-ExecStartPre=/usr/sbin/iptables -D FORWARD -i br0 -j ACCEPT +ExecStartPre=-/usr/sbin/iptables -I FORWARD -i br0 -j ACCEPT 
-ExecStartPre=/usr/sbin/iptables -I FORWARD -i br0 -j ACCEPT+ExecStopPost=/usr/sbin/iptables -D FORWARD -i br0 -j ACCEPT 
 +</code> 
 +(the "-" at the beginning tolerates failures. In this way, both if the rule doesn't exist or it's duplicate, a new one gets created and then delete during stopping) 
 +<code> 
 +$ sudo systemctl daemon-reload 
 +$ sudo systemctl restart docker
 </code> </code>
 Remember to adjust your iptables path according to the distro you are using. Remember to adjust your iptables path according to the distro you are using.
  
 More details and credit [[https://bbs.archlinux.org/viewtopic.php?id=233727|here]] and [[https://serverfault.com/questions/963759/docker-breaks-libvirt-bridge-network|here]] More details and credit [[https://bbs.archlinux.org/viewtopic.php?id=233727|here]] and [[https://serverfault.com/questions/963759/docker-breaks-libvirt-bridge-network|here]]
 +==== Errors ====
 +  * Cannot remove container using ZFS volume:
 +    * error: <code>Error response from daemon: container 13229c2ec314a390bc2edf641c9d189ac1dcf69f6b56bb7e681f032cbc9bc329: driver "zfs" failed to remove root filesystem: exit status 1: "/sbin/zfs fs destroy -r zpool-docker/9a1252e3f5f687077620636855ae9de7aeabd41d4d9dd3e3bcb4892f90901a59" => cannot open 'zpool-docker/9a1252e3f5f687077620636855ae9de7aeabd41d4d9dd3e3bcb4892f90901a59': dataset does not exist</code>
 +    * [[https://github.com/moby/moby/issues/40132#issuecomment-826139573|solution]]
 +
 +
software/docker.1592723778.txt · Last modified: (external edit)