Hi folks,
Let’s say mirror.gcr.io as ( Registry Mirrors ) was configured for GCP VM. How can I define from which docker image registry (whether Google mirror registry or Docker Hub) does the next image come:
docker pull alpine
?
Thanks.
Share and learn in the Docker community.
Hi folks,
Let’s say mirror.gcr.io as ( Registry Mirrors ) was configured for GCP VM. How can I define from which docker image registry (whether Google mirror registry or Docker Hub) does the next image come:
docker pull alpine
?
Thanks.
Registry Mirrors are ment to be used for regional mirrors of dockerhub.
It seems you want to use a private registry (everything except dockerhub is considered private).
Then docker pull mirror.gcr.io/alpine is the way to go. If the repo requires a login, then perform docker login mirror.gcr.io before.
@meyay
I thought for example if I have pre-configured GCP VM docker daemon with:
docker info
Registry: https://index.docker.io/v1/
Labels:
provider=google
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://mirror.gcr.io/
(please note the output which includes Registry Mirrors), then when I do docker pull alpine docker will try to get alpine:latest image at first from Google mirror registry - mirror.gcr.io, and if this image does not exist there will get it from Docker Hub.