docker-build-run-push icon indicating copy to clipboard operation
docker-build-run-push copied to clipboard

Tag during build, not during push?

Open nidi3 opened this issue 8 years ago • 2 comments

Is there a reason that the image is tagged during push and not during build?

I'd like to build a container and test it locally before pushing. During build, the image is named name:version but I'd like to access it with user/name:latest

nidi3 avatar Mar 18 '16 14:03 nidi3

I believe npm's version script hook could be used in this. https://docs.npmjs.com/cli/version

Using that one could run npm version patch -m "Upgrade to %s for reasons" were npm would bump the version which could be picked up by your tool. Besides that if anything would fail, the git tag wouldn't be created.

This would make this way useful in CI environments! :)

noherczeg avatar Jun 05 '16 20:06 noherczeg

Hi, This is a very useful package for building, running and pushing the docker container. I however am concerned about how could we tag an image with a customized tag? The problem i'm trying to solve is: Trying to push docker images to a private registry in development environment, the registry doesn't overwrite the existing image containing the same tag, instead the build fails. So i want to add a sub tag to ever new image i push to the registry. Any advice would be appreciated. Thanks.

prachi-chauhan avatar May 13 '19 20:05 prachi-chauhan