Networking with multiple daemons on the same host

I have a few questions about running multiple daemons on the same host:

  1. Does using the default bridge (docker0) for both daemons cause problems?
  2. The dockerd reference mentions potential problems wrt. one daemon overwriting iptable rules added by the other if both use --iptables=true. What are the risks here exactly, if both daemons enable iptables?

I have never tried running multiple Docker daemons on the same machine. The only case when I used multiple daemons was when I used a special operating system which had a Docker daemon for system tools and another for the end-user. The OS was basically based on Docker. I think it was RancherOS but I’m not sure.

I don’t know what Docker does when multiple daemon wants to handle the same docker0 interface. If the parameters are the same, I guess it could work, but I’m not sure that one daemon would know about what IP addresses were used by the other. Maybe it would know about it, as Docker also recognizes existing, used IP addresses like your LAN network, but as I mentioned, I have never tried it. And if you change anything, like the IP range, then I’m pretty sure you can have only one daemon using the same docker0. And as the documentation you referred to menitons, the bridge name is one of the parameters you definitely need to change when using two daemons.

When you start the Docker daemon, it regenerates the iptables rules that it manages. It will not care about that you have another daemon stil relying on those rules. So I guess this is at least one example why the documentation says you should have only one daemon using iptables.