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 1.4 requires --force when using existing tag #759

Closed
novemberborn opened this issue Dec 15, 2014 · 4 comments · Fixed by #782
Closed

Docker 1.4 requires --force when using existing tag #759

novemberborn opened this issue Dec 15, 2014 · 4 comments · Fixed by #782

Comments

@novemberborn
Copy link

See moby/moby#8511.

When the Docker image is built it's tagged with the first tag (https://github.com/drone/drone/blob/fb254e3f2c675ed65b78551224e3ed1115739f5c/plugin/publish/docker.go#L92), then later all tags are applied (https://github.com/drone/drone/blob/fb254e3f2c675ed65b78551224e3ed1115739f5c/plugin/publish/docker.go#L102).

This should either use --force for all tags, or not retag the first one.

@meoooh
Copy link

meoooh commented Dec 21, 2014

👍

I have got error this.

$ docker tag localhost:5000/api:$DRONE_BRANCH-$(git rev-parse HEAD) localhost:5000/api:$DRONE_BRANCH-$(git rev-parse HEAD) time="2014-12-20T19:24:33Z" level="fatal" msg="Error response from daemon: Conflict: Tag deploy-f43afc84aa4cbf3effbb473d6db99325b5d311ec is already set to image 6901019cc5646c3026990fa3e2fa99ef59947bbd232edf7d821182f8132daf67, if you want to replace it, please use -f option"

docker version 1.4.1
http:https://docs.docker.com/reference/commandline/cli/#tag

@gregory90
Copy link

+1

@bradrydzewski
Copy link

just merged pull request from @gregory90. Feel free to download the latest .deb file and try it out.

@rics3n
Copy link

rics3n commented Jan 19, 2015

is there a reason why you don't use the --force option on all tags? The problem I see is that if you want to use static tags like "latest" the build will fail on the second build, because latest is already there.

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

Successfully merging a pull request may close this issue.

5 participants