Create pull-k8s-image.sh

This commit is contained in:
AnJia 2022-05-20 09:38:34 +08:00 committed by GitHub
parent 7b3792464f
commit db60725389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

9
pull-k8s-image.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
k8s_img=$1
mirror_img=$(echo ${k8s_img}|
sed 's/k8s\.gcr\.io/anjia0532\/google-containers/g;s/gcr\.io/anjia0532/g;s/\//\./g;s/ /\n/g;s/anjia0532\./anjia0532\//g' |
uniq)
sudo docker pull ${mirror_img}
sudo docker tag ${mirror_img} ${k8s_img}