Skip to content

Instantly share code, notes, and snippets.

@tarnfeld
Last active August 29, 2015 13:56
Show Gist options
  • Save tarnfeld/9231466 to your computer and use it in GitHub Desktop.
Save tarnfeld/9231466 to your computer and use it in GitHub Desktop.
docker build
>> built XXXXX
docker tag registry/test/FOOBAR:my-tag
docker push registry/test/FOOBAR
>> pushes XXXXX to registry/test/FOOBAR (uploaded)
docker build
>> built XXXX1
docker tag registry/test/FOOBAR:my-new-tag
docker push registry/test/FOOBAR
>> pushes XXXXX to registry/test/FOOBAR:my-tag (skipped as pushed before)
>> pushes XXXX1 to registry/test/FOOBAR:my-new-tag (uploaded)
-- another machine --
docker pull -t my-new-tag registry/test/FOOBAR
>> pulls registry/test/FOOBAR:my-tag (XXXXX)
docker pull -t my-new-tag registry/test/FOOBAR
>> pulls registry/test/FOOBAR:my-new-tag (XXXX1)
##### This is great. #####
##### However. If (for cleanup purposes) the layers and image attached to registry/test/FOOBAR:my-tag are deleted from the registry, this will happen... #####
docker push registry/test/FOOBAR
>> pushes XXXXX to registry/test/FOOBAR:my-tag (uploaded)
>> pushes XXXX1 to registry/test/FOOBAR:my-new-tag (uploaded)
##### Now we're back where we started, it pushed my-tag which was actually deleted from the registry on purpose #####
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment