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

docker:remove does not remove image when multiple tags are available #193

Open
bgrieder opened this issue Jun 13, 2015 · 10 comments
Open

docker:remove does not remove image when multiple tags are available #193

bgrieder opened this issue Jun 13, 2015 · 10 comments
Labels
Milestone

Comments

@bgrieder
Copy link

When an image is tagged with the project.version and latest , running mvn -Ddocker.removeAll docker:remove only removes the tag with the project.version
The image is still available with the latest tag

@bgrieder bgrieder changed the title docker:remove does not remove image when multiple targs are available docker:remove does not remove image when multiple tars are available Jun 13, 2015
@rhuss rhuss added the bug label Jun 14, 2015
@bgrieder bgrieder changed the title docker:remove does not remove image when multiple tars are available docker:remove does not remove image when multiple tags are available Jun 15, 2015
@bgrieder
Copy link
Author

Cannot reproduce this issue anymore. I (and another colleague) are sometimes left with images "none none" in our docker instance running on boot2docker (OSX).
I am unable to explain why the behaviour changed
Closing for now

@dverbeek84
Copy link

I have the same issue at the moment.
So it still exists.

@rhuss
Copy link
Collaborator

rhuss commented Sep 4, 2015

@dverbeek84 what version are you running ?

@rhuss rhuss reopened this Sep 4, 2015
@dverbeek84
Copy link

jvm: 1.8
docker-maven-plugin: 0.13.3
docker-version: 1.7.1

Clean CentOS 7.1 server running on virtualbox(no boot2docker)

I have set up <removeAll>true</removeAll>

in the debug i see:
Executing request DELETE /v1.17/images/snapshot.onegini.com%2Flibrary%2Fbaseimage%3A2.0.1-SNAPSHOT?force=1
this will ony remove the tag

Maybe we can remove the image by ID instead of tag?

@GKTheOne
Copy link

Can also confirm.

jvm: 1.8.0_25
maven: 3.2.3
docker-maven-plugin: 0.13.6
docker-client: 1.7.1
docker-server: 1.8.2

I have:

<tags>
    <tag>latest</tag>
    <tag>${project.version}</tag>
</tags>

It removes the first (latest) but not the second (${project.version}) using docker.removeAll

Cheers,
Gary

@rhuss rhuss added this to the 0.13.7 milestone Nov 16, 2015
@rhuss rhuss modified the milestones: 0.13.7, 0.14.0 Dec 8, 2015
@rhuss rhuss modified the milestones: 0.14.0, 0.14.1 Feb 24, 2016
@rhuss rhuss modified the milestones: 0.14.1, 0.15.1 Mar 23, 2016
@rhuss rhuss modified the milestones: 0.15.3, 0.15.10 Jun 28, 2016
@ghostcity
Copy link

Unfortunately, this is still an issue.
I am running docker-maven-plugin v0.23.0 with Maven v3.5.0 on Java v1.8.0_151.
And similar to the comments above only the first image-tag-tuple is removed. The others are kept. Further, there is <none> image listed when calling docker images.

@ghostcity
Copy link

Shall I specify further details, or provide some pom.xml snippets.
However, there won't be nothing new; It is similar to #193 (comment).

@abhsc
Copy link
Contributor

abhsc commented Nov 30, 2017

I tried to use this functionality today, we use the same

<dockerFileDir>rabbitmq</dockerFileDir>
<tags>
  <tag>latest</tag>
  <tag>${project.version}</tag>
</tags>

format and confirm the tagged version remains. Not so helpful when modifying files ADDed in via the Dockerfile in dockerFileDir

rhuss added a commit that referenced this issue Jan 17, 2018
#193 Add support for removing tagged images
@sabf81
Copy link

sabf81 commented Jun 12, 2020

Is that Bug now resolved?
I use the version 0.33.0 and it does not work correct. Only the latest image were deleted, as mentioned before.
my config locks like that:

<configuration>
                            <removeMode>all</removeMode>
                            <images>
                                <image>
                                    <name>${docker-image.name}</name>
                                </image>
                            </images>
</configuration>

@blackat
Copy link

blackat commented Feb 2, 2021

Hello,
I am using version 0.34.1 and it works, the image is removed 👍🏼

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

8 participants