This write-up will discuss pulling an image in Docker from a private registry.
How to Pull Image From Docker Private Registry?
Pulling Docker images means downloading images from any source or registry. For pulling an image in Docker from a private registry, first, users are required to start the registry container. Then, log in to their private registry and pull the Docker image.
For this purpose, go through the listed instructions.
Step 1: Log in to Private Registry
To log in to a Docker private registry, utilize the provided command. For instance, we have logged in to our private registry operating on “localhost:5000”:
Note: Before logging in to the private registry, users must start the registry container.
Step 2: Visit Registry Catalog
Next, navigate to the local registry catalog using the “<domain/v2/-catalog>” URL. As our registry is operating on “localhost:5000”, therefore, we have used the “localhost:5000/v2/_catalog” URL. The registry catalog will display all available images:
Step 3: Pull Image From Private Repository
Next, pull the Docker image from the private registry using the “docker pull <source-registry>/<image-name>:tag” command:
Step 4: Verification
Next, list down all Docker images to confirm if the required image is pulled or not. To do so, use the mentioned command:
It can be noticed that we have successfully pulled the Docker image from a private registry.
Conclusion
To pull the Docker image from a private registry, users are required to start the registry container. Then, log in to the private registry. After that, utilize the “docker pull <image-name>” command to pull the Docker image from Docker private registry. This blog has illustrated the method for pulling an image from a Docker private registry.