Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where Docker default registry URL is configured?

I am refering to this link - Docker pull.

By default, docker pull pulls images from Docker Hub (https://hub.docker.com).

enter image description here

I would like to know where this link is configured on our local machine setup. I am using Docker on Windows 10.

like image 542
asg Avatar asked Dec 19 '18 08:12

asg


People also ask

Where is docker registry URL?

Docker Hub official website has been moved to https://registry.hub.docker.com from https://hub.docker.com/.

Where is docker registry stored?

The Docker Registry configuration is defined inside of /etc/registry/config. yml . With the default configuration the registry listens on ports 5000 and stores the Docker images under /var/lib/docker-registry .

Which is the default docker registry?

The default Docker registry is the Oracle Container Registry at https://container-registry.oracle.com. The Oracle Container Registry contains Docker images for a number of Oracle products, including Oracle OpenStack.


1 Answers

You cannot change the default domain of a docker image. This is by design:

Your Docker installation with this "private registry defined in the config file" would be incompatible with every other Docker installation out there. Running docker pull debian needs to pull from the same place on every Docker install.

A developer using Docker on their box will use debian, centos and ubuntu official images. Your hacked up Docker install would just serve your own versions of those images (if they're present) and this will break things.

You should identify your image through the full URL:

<your-private-registry>/<repository>/<image>:<tag>

The default domain docker.io (the "docker hub") is hardcoded in docker's code. For example here:

https://github.com/docker/distribution/blob/master/reference/normalize.go

Check the function splitDockerDomain which sets docker.io as registry if it's not provided by the user.

like image 155
Fabian Braun Avatar answered Oct 10 '22 01:10

Fabian Braun