0 Star 3 Fork 0

evine / myscripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
del_dh_repo_tag.sh 480 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
## 脚本作用:删除docker hub上不需要的单平台tag
## 需要安装hub-tool:https://github.com/docker/hub-tool
## 需要传参 $1: HUB上的仓库名称
repo=$1
arches="arm-v6 arm-v7 arm64 amd64 386 ppc64le s390x"
tags=$(hub-tool tag ls $repo | awk '{if (NR>1){print $1}}')
for tag in $tags; do
for arch in $arches; do
if [[ ${tag} == ${repo}:*-${arch} ]]; then
hub-tool tag rm --verbose -f $tag
fi
done
done
1
https://gitee.com/evine/myscripts.git
git@gitee.com:evine/myscripts.git
evine
myscripts
myscripts
master

搜索帮助