Google Container Registry Mirror [last sync 2018-09-05 01:42 UTC]

Syntax

gcr.io/namespace/image_name:image_tag 
#eq
anjia0532/namespace.image_name:image_tag

# special
k8s.gcr.io/{image}/{tag} <==> gcr.io/google-containers/{image}/{tag} <==> anjia0532/google-containers.{image}/{tag}Copy the code

Add new namespace

Fork and edit sync branch file gcr_namespaces

append new line about namespace(e.g. gcr.io/google-containers u should append google-containers,k8s.gcr.io eq gcr.io/google-containers)

save and commit a PR for this repo.

Example

Docker pull anjia0532/google-containers.federation-controller-manager-arm64:v1.3.1-beta Gcr. IO/Google-containers /federation-controller-manager-arm64:v1.3.1-beta.1 # special # eq Docker pull K8s. GCR. IO/federation - controller - manager - arm64: v1.3.1 - beta. 1Copy the code

ReTag anjia0532 images to gcr.io

IO /google-containers/federation-controller-manager-arm64:v1.3.1-beta.1 to real image # this will convert GCR. IO/Google - containers/federation - controller - the manager - arm64: v1.3.1 - beta. 1 # to Anjia0532 /google-containers.federation-controller-manager-arm64:v1.3.1-beta.1 and pull it # k8s.gcr. IO /{image}/{tag} <==> gcr.io/google-containers/{image}/{tag} <==> anjia0532/google-containers.{image}/{tag} images=$(cat img.txt) #or #images=$(cat <<EOF # gcr. IO /google-containers/federation-controller-manager-arm64:v1.3.1-beta.1 # GCR. IO/Google - containers/federation - controller - the manager - arm64: v1.3.1 - beta. 1 # GCR. IO/Google - containers/federation - controller - the manager - arm64: v1.3.1 - beta. # 1 # EOF) eval $(echo ${'} | sed 's/k8s\.gcr\.io/anjia0532\/google-containers/g; s/gcr\.io/anjia0532/g; s/\//\./g; s/ /\n/g; s/anjia0532\./anjia0532\//g' | uniq | awk '{print "docker pull "$1";" }' ) # this code will retag all of anjia0532's image from local e.g. Anjia0532 / Google - containers. The federation - controller - the manager - arm64: v1.3.1 - beta. 1 # to GCR. IO/Google - containers/federation - controller - the manager - arm64: v1.3.1 - beta. 1 # k8s. GCR. IO / {image} / {tag} < = = > gcr.io/google-containers/{image}/{tag} <==> anjia0532/google-containers.{image}/{tag} for img in $(docker images --format "{{.Repository}}:{{.Tag}}"| grep "anjia0532"); do n=$(echo ${img}| awk -F'[/.:]' '{printf "gcr.io/%s",$2}') image=$(echo ${img}| awk -F'[/.:]' '{printf "/%s",$3}') tag=$(echo ${img}| awk -F'[:]' '{printf ":%s",$2}') docker tag $img "${n}${image}${tag}" [[ ${n} == "gcr.io/google-containers" ]] && docker tag $img "k8s.gcr.io${image}${tag}" doneCopy the code

Changelog

Mirror 11 namespaces image from gcr.io

GCR. IO/runconduit /…

GCR. IO/Google – samp… instead

GCR. IO/kubernetes -…

GCR. IO/k8s – minikub…

GCR. IO/tf – on – k8s – d…

GCR. IO/spinnaker – m…

GCR. IO/Google – cont…

GCR. IO/distroless /…

GCR. IO/istio – relea…

GCR. IO/linkerd – IO /…

GCR. IO/cloud – datal…