When trying to assign a Docker container to my newly created bridge network, created using default parameters like so:
docker network create myBridge
And afterwards assigning it to one of my containers:
docker network connect myBridge containerName
I receive the following error message:
Failed to add interface vetha4a00de to sandbox: error setting interface "vetha4a00de" IP to 172.21.0.3/16: cannot program address 172.21.0.3/16 in sandbox interface because it conflicts with existing route {Ifindex: 517 Dst: 172.21.0.0/16 Src: 172.21.0.1 Gw: Flags: [] Table: 254}
I have no existing networks using this subnet, and I've even tried defining a completely different subnet upon creation, but it still gives me the same message.
The same happens when assigning the containers to the default bridge network - and they seem to only work when using the host network. Is there something I'm missing here? Shouldn't I be able to assign a container to a bridge network by doing this?