Docker Community Forums

Share and learn in the Docker community.

Docker image downloading from Docker_Hub or from Registry Mirrors?

Hi folks,

Let’s say 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


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 is the way to go. If the repo requires a login, then perform docker login before.

The easiest way to run a registry as a pull through cache is to run the official Registry image. At least, you need to specify proxy.remoteurl within /etc/docker/registry/config.yml as described in the following subsection.

Multiple registry caches can be deployed over the same back-end. A single registry cache ensures that concurrent requests do not pull duplicate data, but this property does not hold true for a registry cache cluster.

I have no goal to configure/run Registry as a pull-through cache, but it is already configured by Google. Here is link how to configure dockerd to use it.

I thought for example if I have pre-configured GCP VM docker daemon with:
docker info

 Experimental: false
 Insecure Registries:
 Registry Mirrors:

(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 -, and if this image does not exist there will get it from Docker Hub.