Docker Community Forums

Share and learn in the Docker community.

Where is config.yaml and image files stored for private docker registry?

After installing a private docker registry on linux, where can I find the

  • config.yaml file (everything online points to this /etc/docker/registry/config.yml but I have no such path)

  • the default location where the images are stored on the local file system


Assuming you installed the registry by deploying the registry image, then that path is inside the container:

$ docker run registry ls /etc/docker/registry/config.yml


The images are also in the container in /var/lib/registry

Copy an image from Docker Hub to your registry
You can pull an image from Docker Hub and push it to your registry. The following example pulls the ubuntu:16.04 image from Docker Hub and re-tags it as my-ubuntu, then pushes it to the local registry. Finally, the ubuntu:16.04 and my-ubuntu images are deleted locally and the my-ubuntu image is pulled from the local registry.

Pull the ubuntu:16.04 image from Docker Hub.

$ docker pull ubuntu:16.04
Tag the image as localhost:5000/my-ubuntu. This creates an additional tag for the existing image. When the first part of the tag is a hostname and port, Docker interprets this as the location of a registry, when pushing.

$ docker tag ubuntu:16.04 localhost:5000/my-ubuntu
Push the image to the local registry running at localhost:5000:

$ docker push localhost:5000/my-ubuntu
Remove the locally-cached ubuntu:16.04 and localhost:5000/my-ubuntu images, so that you can test pulling the image from your registry. This does not remove the localhost:5000/my-ubuntu image from your registry.

docker image remove ubuntu:16.04 docker image remove localhost:5000/my-ubuntu
Pull the localhost:5000/my-ubuntu image from your local registry.

$ docker pull localhost:5000/my-ubuntu