Last active
April 2, 2018 10:52
-
-
Save Reasno/5771186072bedaa91725010ba7948afa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
KUBE_VERSION=v1.10.0 | |
KUBE_PAUSE_VERSION=3.0 | |
ETCD_VERSION=3.2.13 | |
DNS_VERSION=1.14.8 | |
GCR_URL=gcr.io/google_containers | |
ALIYUN_URL=registry.cn-qingdao.aliyuncs.com/huiji | |
images=(kube-proxy-amd64:${KUBE_VERSION} | |
kube-scheduler-amd64:${KUBE_VERSION} | |
kube-controller-manager-amd64:${KUBE_VERSION} | |
kube-apiserver-amd64:${KUBE_VERSION} | |
pause-amd64:${KUBE_PAUSE_VERSION} | |
etcd-amd64:${ETCD_VERSION} | |
k8s-dns-sidecar-amd64:${DNS_VERSION} | |
k8s-dns-kube-dns-amd64:${DNS_VERSION} | |
k8s-dns-dnsmasq-nanny-amd64:${DNS_VERSION}) | |
for imageName in ${images[@]} ; do | |
docker pull $GCR_URL/$imageName | |
docker tag $GCR_URL/$imageName $ALIYUN_URL/$imageName | |
docker login | |
docker push $ALIYUN_URL/$imageName | |
docker rmi $ALIYUN_URL/$imageName | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment