Artifact path pattern

artifact:

Folder integration revision regular expression examples:
Maven’s folder integration revision is simply the constant -SNAPSHOTappended to the base revision (“1.2-SNAPSHOT”), so the regular expression is

SNAPSHOT

File integration revision regular expression examples:
Maven’s file integration revision can be either the -SNAPSHOT constant (“1.2-SNAPSHOT”) or a timestamp, where the date and time are separated by a dot (’.’), with an addition of a dash (’-’) and a build-number (“2.3-20110108.100922-2”), so the regular expression should be able to fit them both

SNAPSHOT|(?:(?:\d{8}.\d{6})-(?:\d+))
[orgPath]/			[module]/	[baseRev](-[folderItegRev])/	[module]-[baseRev](-[fileItegRev])(-[classifier]).[ext]
org/eclipse/jetty/	jetty-ajp/	7.0.2/							jetty-ajp-7.0.2.jar
org/eclipse/jetty/	jetty-ajp/	7.0.2-SNAPSHOT/					jetty-ajp-7.0.2-20201211.1.jar

A Docker repository is a hosted collection of tagged images that, together, create the file system for a container

A Docker registry is a host that stores Docker repositories

An Artifactory repository is a hosted collection of Docker repositories, effectively, a Docker registry in every way, and one that you can access transparently with the Docker client.

docker镜像tag命名规范

在基础知识部分,介绍了标准镜像名由四部分组成: 仓库地址/项目名/镜像名:标签,如daocloud.io/library/nginx:latest
一个高效的版本命名方案可以让用户清楚地知道当前使用的是哪个镜像,同时还可以保持足够的灵活性。
每个镜像可以有多个 tag,而多个 tag 可能对应的是同一个镜像。下面介绍 Docker 社区普遍使用的 tag 方案。

初始版本v1.9.1
镜像名为myimage,当前需要的版本为 v1.9.1。那么可以给镜像打上四个 tag:1、1.9、1.9.1和 latest。

docker tag myimage-v1.9.1 myimage:1
docker tag myimage-v1.9.1 myimage:1.9
docker tag myimage-v1.9.1 myimage:1.9.1
docker tag myimage-v1.9.1 myimage:latest

小版本更新v1.9.2
过了一段时间,发布了 v1.9.2。这时可以打上 1.9.2 的 tag,并将1、1.9和 latest 从 v1.9.1 移到 v1.9.2。

docker tag myimage-v1.9.2 myimage:1
docker tag myimage-v1.9.2 myimage:1.9
docker tag myimage-v1.9.2 myimage:1.9.2
docker tag myimage-v1.9.2 myimage:latest

大版本更新
之后,v2.0.1 发布了。这时可以打上2、2.0、2.0.1的tag,并将 latest 移到 v2.0.1。

docker tag myimage-v2.0.1 myimage:2
docker tag myimage-v2.0.1 myimage:2.0
docker tag myimage-v2.0.1 myimage:2.0.1
docker tag myimage-v2.0.1 myimage:latest

tag方法有点总结
myimage:1 始终指向 1 这个分支中最新的镜像。
myimage:1.9 始终指向 1.9.x 中最新的镜像。
myimage:latest 始终指向所有版本中最新的镜像。
如果想使用特定版本,可以选择 myimage:1.9.1、myimage:1.9.2 或 myimage:2.0.1。
Docker Hub 上很多 repository 都采用这种方案,要熟练使用。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值