I'm trying to create a Docker network which would use an existing bridge on the host but without configuring any IP on this bridge. When I run:
docker network create -o "com.docker.network.bridge.name=br0" testnet
Docker automatically assign an IP address on the host and always use this IP as the gateway for other containers.
What I want is a network without an IP on the host and to use another container as the gateway (this container is connected to multiple networks). I have very good reasons for this setup and not letting the host directly route between these networks. Is it possible and how can I achieve that?
Thank you in advance for your help,
spongebob
docker network create --internal ...
--internal
makes is that it adds some iptables rules so containers cannot communicate with other networks. But it still adds an IP address on the host.