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

Deletion of Images with Multiple Tags Fails #96

Closed
ceagan opened this issue Feb 10, 2016 · 3 comments
Closed

Deletion of Images with Multiple Tags Fails #96

ceagan opened this issue Feb 10, 2016 · 3 comments
Labels

Comments

@ceagan
Copy link

ceagan commented Feb 10, 2016

Since upgrading to Docker 1.8.2 on CentOS 7, we have started to see warnings related to the deletion of images in the maven output. The result of the failure is that the clean operation does not correctly delete images as expected.

Conflict, cannot delete image b17225d77c2be1ff2bbd5590c250873c26759f3de985a63e4346151eb4a04a66 because it is tagged in multiple repositories, use -f to force

The error is due to the fact that the image with the specific ID is tagged with multiple names in the local image repository. The Docker documentation now explains that removal of an image which has multiple tags should use the --force option or the client should remove each of the tags by name via the rmi command.

One solution would be to change the docker-maven-plugin to use --force internally. Alternately, the docker-maven-plugin could track the tags it creates by name and remove them individually during a clean operation.

@alexec alexec added the bug label May 19, 2016
@alexec
Copy link
Owner

alexec commented May 19, 2016

Hi @ceagan, do you fancy contributing? I think it just a case of changing this line of code and writing a test:

https://github.com/alexec/docker-java-orchestration/blob/master/docker-java-orchestration-core/src/main/java/com/alexecollins/docker/orchestration/DockerOrchestrator.java#L234

I don't really have time at the moment to look at this myself :(

@alexec
Copy link
Owner

alexec commented May 24, 2016

Fixed, awaiting release.

@ceagan
Copy link
Author

ceagan commented May 25, 2016

Sorry I didn't see your message until now. I just got back from vacation. Thanks for making the fix. I've been using your plugin a lot and though I missed this opportunity, I will probably end up making a contribution at some point.

@alexec alexec closed this as completed May 25, 2016
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

2 participants