Public static ip for container does weird things

I am trying to give my container a static ip I have got from a pool of static ip addresses I have so my ip is :


so according to this article :

I did following :

docker network create --subnet --gateway iptastic
docker run --rm -it --net iptastic --ip nginx

but doing this I can see the bridge network has inet set to the gateway ip which means I presumably messed up our network since I duplicated the gateway ip. Why does the bridge take the gateway IP address ? Is this a bug or am I doing something wrong ?

not doing anything wrong… what is what the network create does…
sets up the network and gives it a way out (the bridge/gateway)

you cannot give it the existing gateway

by default (and I don’t know if/how to change it) the other side of the gateway goes THRU the host network adapter. but no host outside of the docker host will know about the local network.