Docker network not found

 Docker network not found

Failed to remove network <id>: Error response from daemon: network <id> not foundFailed to remove some resources from stack: <name>

When using docker network ls, the network is indeed not removed, however, docker network rm <id> always results in the following:

Error response from daemon: network <id> not found

1. If you are attempting to add a container to an existing network that no longer exists, then you can use docker-compose up --force-recreate. 

2. Inspect the network which we are unable to delete

docker network inspect <id> or <name>

Disconnect the network

docker network disconnect -f <networkID> <endpointName> or <endpointId>

Delete unused networks

docker network prune

docker system prune will remove 'all networks not used by at least one container' allowing them to be recreated next docker-compose up


Popular posts from this blog

How to clean DB from old logs in Magento 1.x

Reduce (shrink) and resize raw disk at Proxmox

Apache 2.4 + mod_wsgi + Python 3.7 + Django installation on Centos 7.10