Mantain mirror (#795)

This commit is contained in:
Shiming Zhang
2023-11-10 17:44:41 +08:00
committed by GitHub
parent 45aee54e98
commit b20b9daf42
5 changed files with 77 additions and 21 deletions

View File

@@ -2,26 +2,6 @@
export LC_ALL=C
function filter_docker_library() {
while read -r line; do
if [[ $line =~ ^docker\.io/[^/]*$ ]]; then
echo "docker.io/library/${line#docker.io/}"
else
echo "${line}"
fi
done
}
function filter_k8s_old() {
while read -r line; do
if [[ $line =~ ^k8s\.gcr\.io/.*$ ]]; then
echo "registry.k8s.io/${line#k8s.gcr.io/}"
else
echo "${line}"
fi
done
}
cat $1 |
filter_docker_library |
filter_k8s_old |