7

I've searched around and can't find a real answer to this. If I create a docker git repo and set up autobuild to my dockerhub account, it will build with a single tag (i.e. latest, or 1.0 or foo) but I can't find any way to add a tag afterwards as you can via command line with a locally built docker image. Pulling down the image and then retagging doesn't work as the autobuild repos are read-only outside of the webui.

Being able to manually add a tag to an existing build would satisfy me for now, but being able to script in something to grab the correct tag version would be the best solution.

Justin
  • 178
  • 7
  • A full answer to this is provided at ... http://stackoverflow.com/questions/25328166/docker-hub-automated-build-tagging/31538378#31538378 – danday74 Jul 21 '15 at 12:00
  • A full answer to this is provided at http://stackoverflow.com/questions/25328166/docker-hub-automated-build-tagging/31538378#31538378 – danday74 Jul 21 '15 at 12:01

1 Answers1

4

You can do this through the UI somewhat indirectly:

  • Select Automated Build

Automated Build

  • Add a new build trigger

Build Trigger

  • Select Tag from the drop down on the left
  • Enter the git commit hash of the change you want tagged as the Name
  • Enter the tag you want to add to your build Tag
Usman Ismail
  • 17,999
  • 14
  • 83
  • 165
  • 1
    That's a bit of a pain. I was hoping for a better way to do that. Currently the images I'm trying to build are archlinux ones, which only have the latest version of a package available. I was hoping to be able to tag a release as running service v1 or v2 etc to be able to roll back if a new version produces issues. – Justin Sep 29 '14 at 23:52
  • 1
    Any news on this? Is it possible to access the github tag in the "SomeTag" field by a variable? IMHO it would be nice to at least be able to re-use the same tag names on both sides. – Simon Nov 05 '14 at 15:39
  • This does not work for me, I get `Remote branch 5b7fe19b1cb333440118b1eb82741cd6ab4562ea not found in upstream origin`. It's like it's looking for a branch and not a commit id. – Dan Tenenbaum Jan 02 '15 at 20:48
  • Did you change the drop down to tag and not branch? – Usman Ismail Jan 02 '15 at 20:49
  • aw, really does not work, same problem that@DanTenenbaum and yes I've selected tag – deFreitas Sep 24 '16 at 22:38