On two different machines (a desktop and a server), the same docker-compose file behaves differently...
On one machine docker-compose down
seems to remove ip routes altogether that a following docker-compose up
does not recreate.
Transcript:
After systemctl restart docker ip route
gives:
default via 192.168.22.1 dev enp3s0 proto dhcp src 192.168.22.30 metric 202
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-b32036613f97 proto kernel scope link src 172.18.0.1 linkdown
172.20.0.0/16 dev br-3f0603a1198c proto kernel scope link src 172.20.0.1 linkdown
192.168.22.0/24 dev enp3s0 proto dhcp scope link src 192.168.22.30 metric 202
192.168.22.1 dev enp3s0 proto dhcp scope link src 192.168.22.30 metric 1024
After docker-compose up
:
default via 192.168.22.1 dev enp3s0 proto dhcp src 192.168.22.30 metric 202
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-b32036613f97 proto kernel scope link src 172.18.0.1
172.20.0.0/16 dev br-3f0603a1198c proto kernel scope link src 172.20.0.1
192.168.22.0/24 dev enp3s0 proto dhcp scope link src 192.168.22.30 metric 202
192.168.22.1 dev enp3s0 proto dhcp scope link src 192.168.22.30 metric 1024
After compose-compose down
the server will give:
default via 192.168.22.1 dev enp3s0 proto dhcp src 192.168.22.30 metric 202
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.22.0/24 dev enp3s0 proto dhcp scope link src 192.168.22.30 metric 202
192.168.22.1 dev enp3s0 proto dhcp scope link src 192.168.22.30 metric 1024
But the desktop will show (as expected):
default via 192.168.22.1 dev enp3s0 proto dhcp src 192.168.22.30 metric 202
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-b32036613f97 proto kernel scope link src 172.18.0.1 linkdown
172.20.0.0/16 dev br-3f0603a1198c proto kernel scope link src 172.20.0.1 linkdown
192.168.22.0/24 dev enp3s0 proto dhcp scope link src 192.168.22.30 metric 202
192.168.22.1 dev enp3s0 proto dhcp scope link src 192.168.22.30 metric 1024
A following docker-compose up
on the desktop will succeed but on the server the routes are not recreated and the containers are not visible to the outside world...
Only a way too expensive full restart of the docker service will bring the routes back on the server...
I have no clue what I am doing wrong.
Both machines are running an up to date version of arch linux. The desktop uses Gnome and runs NetworkManager and the server is headless and runs systemd-networkd... That's pretty much the only difference I can see...
Both versions run:
- Docker version 19.03.5-ce, build 633a0ea838
- docker-compose version 1.25.1, build unknown