Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Error response from daemon: bridge is a pre-defined network and cannot be removed

CentOS 7

Docker 20.10

I want to delete all networks.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

docker container ls
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

As you can see no containers. I was removed it before.
I try this:

docker network ls
NETWORK ID     NAME      DRIVER    SCOPE
1b6758d38df3   bridge    bridge    local
89dea066d590   host      host      local
8e235018309e   none      null      local

And this:

docker network rm 1b6758d38df3
Error response from daemon: bridge is a pre-defined network and cannot be removed

P.S the folder /var/lib/docker is empty

>Solution :

Those are the system networks included in every Docker installation, they are not like user-defined networks and cannot be removed.

From the docs for thedocker network prune command:

Note that system networks such as bridge, host, and none will never be pruned

From the Network containers tutorial page:

Every installation of the Docker Engine automatically includes three default networks.
[…]
The network named bridge is a special network. Unless you tell it otherwise, Docker always launches your containers in this network.

This would mean that removing those networks would break some of Docker‘s networking features.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading