How to delete/disable docker0 bridge on docker startup

Jyothish Kumar S picture Jyothish Kumar S · Sep 3, 2018 · Viewed 11k times · Source

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.

Answer

Anton picture Anton · Jan 9, 2020

Create file /etc/docker/daemon.json

{
    "iptables": false,
    "bridge": "none"
}

And restart docker: systemctl restart docker