Common causes
- A container with the same name was stopped but not removed — stopped containers still hold their network endpoints
- Docker Compose is restarting a service but the old container wasn't fully cleaned up
- A deploy or CI run created a container that wasn't removed after a previous run
- Two containers in the same Compose file or stack are accidentally given the same name
How to fix it
- Remove the old stopped container: docker rm CONTAINER_NAME
- In Docker Compose: docker-compose down before docker-compose up to cleanly recreate containers
- Use --force-recreate with Compose to always recreate: docker-compose up --force-recreate
- List all containers including stopped ones to find the conflict: docker ps -a --filter name=CONTAINER_NAME
Example
$ docker run --name myapp --network mynet myimage
docker: Error response from daemon: endpoint with name myapp already exists in network mynet.A stopped container named myapp is still registered on the mynet network
Browse more errors
The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.
