代码拉取完成,页面将自动刷新
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。