如何添加标签到使用autobuild的docker图像 [英] How to add tags to docker images made using autobuild

查看:126
本文介绍了如何添加标签到使用autobuild的docker图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索过,找不到真正的答案。如果我创建一个docker git repo并将自动建立到我的dockerhub帐户,它将使用单个标签(即最新的,或者是1.0或者foo)来构建,但是我可以通过命令找到任何添加标签的方法配有本地建造的码头图像。拉下图像,然后重新标记不起作用,因为autobuild repos只能在webui外部读取。

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.

推荐答案

你可以通过一些间接的方式来做到这一点:

You can do this through the UI somewhat indirectly:


  • 选择自动构建


  • 添加新的构建触发器


  • 从左侧的下拉菜单中选择标签

  • 输入要标记为名称的更改的git提交哈希值

  • 输入要标记的标签添加到你的build

这篇关于如何添加标签到使用autobuild的docker图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆