Member-only story
How to remove a network with active endpoints in Docker
How to solve docker ERROR: error while removing network when running docker-compose down
1 min readNov 24, 2022
I wanted to run, butdocker-compose down
it failed due to the following error:
ERROR: error while removing network: network <your_network> id cfcb4a603426f2cf71b1f971a9ecb0aae7e6c889a8dc4c55bfd1eb010d8a260b
has active endpoints
Solution
To solve this, just run docker network inspect <your_network>
with the rights permissions. (You may also use sudo if you have the permission).
The output of that command is something like this:
[
{
"Name": "your_network",
"Id": "cfcb4a603426f2cf71b1f971a9ecb0aae7e6c889a8dc4c55bfd1eb010d8a260b",
"Created": "2021-05-05T10:58:08.216143067+02:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "10.0.38.0/24",
"Gateway": "10.0.38.1"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"cf8f158e34d07bb3be8ff73e21fc688dce1ba13a5b941a7a59aff1373a74be8f": {
"Name"…