Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Respect the tag specfied in the image name in removeImage #225

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gidzzz
Copy link
Contributor

@gidzzz gidzzz commented Apr 28, 2016

PR #113 added support for multiple image tags for image removal, but that simple at a glance modification introduced a few problems:

  1. If the name of the image contains a tag, it is ignored, and the operation will affect the :latest tag.
  2. If there is no list of image tags specified, actually nothing will happen at all, because a list annotated with "@parameter(property=...)" will be assigned an empty property and converted to an empty list. An empty list will result in no action due to (3).
  3. If there is a list of image tags specified, they override the tag implied by the image name. This is inconsistent with docker:build, where additional tags really act as such, not as replacement.

(2) is not observable when running the tests, because the way plugins are configured is different for real projects. You can verify that by executing pom-removeImage.xml as standalone (mvn docker:removeImage -f pom-removeImage.xml, add -X to see how the configuration is resolved). I changed the plugin version to 0.4.8-SNAPSHOT and removed the dockerHost parameter to get it to run this way.

Each commit in this PR addresses one of the aforementioned issues.

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

Successfully merging this pull request may close these issues.

None yet

1 participant