docker-maven-plugin: Cannot temporarily tag because target image already exists
Sometimes when we have target image already existing in system, and so caused the docker-maven-plugin failed to temporarily tag. After checked, found following code.
if (!name.hasRegistry() && registry != null) {
if (hasImage(targetImage)) {
throw new DockerAccessException(
String.format("Cannot temporarily tag %s with %s because target image already exists. " +
"Please remove this and retry.",
name.getFullName(), targetImage));
}
I guess it’s abnormal to interrupt the docker push with such errors, is it possible to remove the exception or add a parameter to toggle on/off the exception?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 11
- Comments: 20 (1 by maintainers)
Commits related to this issue
- Issue #838: Removed check if image already exists. This is done by the registry just fine. — committed to blaxx/docker-maven-plugin by deleted user 6 years ago
- Issue #838: Removed check if image already exists. This is done by the registry just fine. — committed to rohanKanojia/docker-maven-plugin by deleted user 6 years ago
- Removed check for existing temporary tag Fixes #838 There are a few reasons why such a tag might exist: * Previous run was killed part way through push tag, resulting in the finally block not runni... — committed to jroper/docker-maven-plugin by jroper 5 years ago
- Removed check for existing temporary tag Fixes #838 There are a few reasons why such a tag might exist: * Previous run was killed part way through push tag, resulting in the finally block not runni... — committed to jroper/docker-maven-plugin by jroper 5 years ago
- Add multiplatform jobs for policy docker images Add three global templates needed to build multiarch images: - {project-name}-docker-manifest-{stream}: creates a docker manifest list with ima... — committed to onap/ci-management by deleted user 5 years ago
Sorry for the super late response, not sure why this issue was below my radar.
I agree that we should be more conservative here and I’m going to tackle this for the next release.
@rhuss Any update on this? I’m running into the same issue and there have been two releases since your last post as far as I can tell.
I will try to make a release before the end of the week, or early next week.
Sorry for the delay, year end stress here 😃
Fixed in #1170.
@NancyChunlan we ended up moving away from this plugin actually. We are now doing the docker and java builds separately.