How do I fix a static IP for a container ?
First I start a container and inspect it, it says
"NetworkSettings": {
"IPAddress": "XX.XX.206.98",
"IPPrefixLen": 27,
"Gateway": "XX.XX.206.105",
"Bridge": "public",
"PortMapping": null,
"Ports": {}
},
then I stop it, and restart, it like
"NetworkSettings": {
"IPAddress": "XX.XX.206.99",
"IPPrefixLen": 27,
"Gateway": "XX.XX.206.105",
"Bridge": "public",
"PortMapping": null,
"Ports": {}
},
As you can see, it changed. I just created a bridge named public, and start docker with -b=public
added. How can I set a static IP for a container?