Is there any way we can disable docker0 bridge on docker startup ?
Tried "bridge": "none" in daemon.json but its not working.
Also removed default docker bridge using "ip link delete docker0" but when we restart docker it came up automatically. So any permanent way to disable/delete default docker bridge on startup ? I see the same question here How to delete interface docker0 but I already tried that and whenever docker is restarted the docker0 bridge came back.
Create file /etc/docker/daemon.json
{
"bridge": "none"
}
And restart docker:
systemctl restart docker
I think I found the answer. Inorder to disable the default bridge network add "bridge": "none"
in daemon.json
and restart docker service. The changes will taken effect immediately if there are no running containers. In my case there were some containers already running, so changes not taken effect. After inspecting the log, could see that info msg="There are old running containers, the network config will not take affect"
So I stopped the running container and restarted the docker service. After that bridge network is disabled. Hope this help someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With