question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Always have image tag with the project.version

See original GitHub issue

Description

When we are working with Docker registry provided by Nexus for release, the registry disabled the “redeploy”, so every image with the same version/tag can only be pushed once.

But the docker-maven-plugin always generate the tag with the POM’s project version. E.g. the POM is version 1.0, and with a continuous build number as 8, I specify the tag with

<tags>
  <tag>${project.version}.${build.number}</tag>
</tags>

The plugin always generates two tags 1.0 and 1.0.8, and tries to push both to registry. Apparently the push of 1.0 must fail, since it’s already pushed to registry together with previous builds, like 1.0.1.

I think it needs a way to disable the default tag of project.version, so I can specify only the intended tags.

Info

  • d-m-p version : 0.20.1
  • Maven version (mvn -v) : 3.0.5
  • Docker version : 1.12.6

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
meggarrcommented, Sep 23, 2017

@rhuss maybe I find another issue, when I tried to build and push in single command,

 mvn clean package docker:build docker:push -Ddocker.push.registry=<my-registry> -Ddocker.skip.tag=true

it tries to push the tags even they are skipped in build. It looks push does not respect docker.skip.tag=true. Is it a bug?

0reactions
meggarrcommented, Sep 26, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Use project version as docker image tag - Atlassian Community
Hi everyone! I have following configuration which builds and pushes my project as image into dockerhub pipelines: branches: master:
Read more >
Jib plugin not able to access project.version as updated by ...
The publish task is able to access the version as updated by the gitflowsemver plugin, but when I try to build a docker...
Read more >
Managing Images | Developer Guide - OpenShift Documentation
Container images can have names added to them that make it more intuitive to determine what they contain, called a tag. Using a...
Read more >
Build your Node image - Docker Documentation
Usually the very first thing you do once you've downloaded a project written in Node.js is to install npm packages. This ensures that...
Read more >
Tag Immutability Rules - Harbor docs
This can be undesirable in certain cases, because the tag can no longer be trusted to identify the image version. The sha256 digest...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found