Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker show current registry

Tags:

In docker, how can one display the current registry info you are currently logged in? I installed docker, if I now do docker push, where does it send my images?

I spend over 30min searching this info from Google and docker docs, and couldn't find it, so I think it deserves its own question.

like image 816
Ville Miekk-oja Avatar asked Sep 27 '16 14:09

Ville Miekk-oja


People also ask

How do I check my current Docker repository?

Go to the Repositories view and click on a repository to see its tags. Image sizes are the cumulative space taken up by the image and all its parent images. This is also the disk space used by the contents of the . tar file created when you docker save an image.

What is registry in Docker container?

What it is. The Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. The Registry is open-source, under the permissive Apache license. You can find the source code on GitHub.

What is Docker default registry?

Docker Hub is Docker's official cloud-based registry for Docker images. As you might expect, since Docker Hub is Docker's official registry, it is the default registry when you install Docker.

What is the Docker registry URL?

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


1 Answers

There's no concept of a "current" registry - full image tags always contain the registry address, but if no registry is specified then the Docker Hub is used as the default.

So docker push user/app pushes to Docker Hub. If you want to push it to a local registry you need to explicitly tag it with the registry address:

docker tag user/app localhost:5000/user/app docker push localhost:5000/user/app 

If your local registry is secured, you need to run docker login localhost:5000 but that does not change the default registry. If you push or pull images without a registry address in the tag, Docker will always use the Hub.

This issue explains the rationale.

like image 198
Elton Stoneman Avatar answered Sep 27 '22 18:09

Elton Stoneman