gnxvw
gnxvw

Reputation: 454

Error response from daemon: No such container:

I want to stop container, but I always get this error and facing wired problem.

When I tried to stop container by using docker-compose down, the error says in below.

$ docker-compose down
Removing network rails_api_default
ERROR: error while removing network: network rails_api_default id ... has active endpoints

So, I inspect the network and tried to stop container, however it says there is no container.

$ docker network inspect rails_api_default
[
    {
        "Name": "rails_api_default",
        "Id": "e22a339dc85a3d7ce7c60bcab218bd939ff9f5578addb6b1d937b5e9ba1f2e7e",
        ....
        "Containers": {
            "966766894bfb110d4a66963f5af423d9f8e2e33a8259e1cca0ced238e5980196": {
                "Name": "966766894bfb_rails_api_app_1",
                ....
            }
        },
    }
]
$ docker stop 966766894bfb_rails_api_app_1
Error response from daemon: No such container: 966766894bfb_rails_api_app_1

Does anyone know what it 966766894bfb_rails_api_app_1, and why this happens?

Upvotes: 0

Views: 6756

Answers (1)

camba1
camba1

Reputation: 1830

That is probably an old container that may have failed at some point. Check if you can see it with docker ps -a and remove it with docker rm <containerName>. If you cannot see it, try

docker network disconnect -f <networkName> <containerName>

Upvotes: 1

Related Questions