Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: cannot delete because running container is using it #14

Open
tony-kerz opened this issue Sep 6, 2015 · 2 comments
Open

question: cannot delete because running container is using it #14

tony-kerz opened this issue Sep 6, 2015 · 2 comments
Labels

Comments

@tony-kerz
Copy link

love the utility (i almost think the functionality should be built into docker itself).

i'm seeing the following when running (is this normal, should it even be attempting this?):

Error calling remove_image alpine:latest 409 Client Error: Conflict ("Conflict, cannot delete 31f630c65071 because the running container a4241b3e14b6 is using it, stop it and use -f to force")

here are the vitals for the environment:

CoreOS stable (633.1.0)
$ docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.3.3
Git commit (client): a8a31ef-dirty
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.3.3
Git commit (server): a8a31ef-dirty

regards,
tony.

@dnephin
Copy link
Contributor

dnephin commented Sep 6, 2015

I've seen this error a lot, so I guess it's normal. I believe it happens when a container is started after dcgc gets a list of containers (which is one of the first things it does), so dcgc thinks an image is not being used. Does that seem possible in your case?

@aripringle
Copy link

For what it's worth, I encountered this as well when trying to use dcgc for the first time. I noticed in a dry-run that it wanted to delete two images that were definitely in use by actively running containers. Running it without a the dry-run flag caused it to print the same errors as the OP.

The end result seemed fine (it deleted everything I want, and couldn't delete those two images), but it does appear that something is a little off in the detection of which images are being used.

This was running on an Amazon ECS instance:

docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5/1.9.1
Built:
OS/Arch: linux/amd64

Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5/1.9.1
Built:
OS/Arch: linux/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants