sync k8s.gcr.io docker images to dockerhub or aliyun registry use aliyun image-syncer and github action!
-
Fork this repo, then create your self secrets:
Settings
-->Secrets
-->New Repository Secrets
- Add your
DOCKERHUB_USERNAME
andDOCKERHUB_PASSWORD
key values.
- Add registry to
images:
that you want to sync:
format
auth:
<src or destation registry url>
username: DOCKERHUB_USERNAME
password: DOCKERHUB_PASSWORD
images:
<src registry>: <destation registry>
DO NOT CHANGE DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD ,it will be replaced by sed command.
For example
auth:
registry.hub.docker.com:
username: DOCKERHUB_USERNAME
password: DOCKERHUB_PASSWORD
images:
k8s.gcr.io/metrics-server/metrics-server: DOCKERHUB_USERNAME/metrics-server
k8s.gcr.io/ingress-nginx/controller: DOCKERHUB_USERNAME/ingress-nginx-controller
k8s.gcr.io/git-sync/git-sync: DOCKERHUB_USERNAME/git-sync
gcr.io/kaniko-project/executor:debug,latest: DOCKERHUB_USERNAME/kaniko-executor
k8s.gcr.io/kube-state-metrics/kube-state-metrics: DOCKERHUB_USERNAME/kube-state-metrics
k8s.gcr.io/sig-storage/nfs-subdir-external-provisioner: DOCKERHUB_USERNAME/nfs-subdir-external-provisioner
k8s.gcr.io/prometheus-adapter/prometheus-adapter: DOCKERHUB_USERNAME/prometheus-adapter
- Check action logs
- After synced, check your images