Docker Registry
Docker Registry is a server-side application that, like a central repository, lets users store their images and share them with others. Based on their needs, users can choose public or private registries.
To create a private Docker Registry, you can use the image provided by Docker. For example, running it with Docker Compose looks like this:
version: '3'
services:
registry:
image: registry:2
ports:
- "5000:5000"
volumes:
- ./data:/var/lib/registry
One-Click Deployment
With Arvancloud Cloud Container ready-made applications, you can set up Docker Registry with just one click. You can choose a registry with a local disk or with Arvancloud Object Storage.
Using Docker Registry
After the application is deployed, you can start working with the registry. Pulling images from the registry and pushing images to it are the most important uses of this application.
Logging In
To access the created registry, you first need to log in to it using the domain assigned to your application. In the following example, the Docker Registry application's domain is dockerregistry-project.apps.ir-thr-ba1.arvanpaas.ir.
The default username and password are admin:password.
docker login https://dockerregistry-project.apps.ir-thr-ba1.arvanpaas.ir/
Pushing an Image
To push an image to the registry, you first need to assign a tag to it, as in the following command:
docker tag bitnami/kubectl dockerregistry-project.apps.ir-thr-ba1.arvanpaas.ir/kubectl
Then push the tagged image with the docker push command:
docker push dockerregistry-project.apps.ir-thr-ba1.arvanpaas.ir/kubectl
Pulling an Image
With the docker pull command, you can get an image from your registry:
docker pull dockerregistry-project.apps.ir-thr-ba1.arvanpaas.ir/kubectl
Building a Manifest from an Image
With registry images, you can build manifests for deploying applications. To do this, you first need to add the registry credentials and then apply the manifest:
image: dockerregistry-project.apps.ir-thr-ba1.arvanpaas.ir/kubectl:latest
name: registery
ports:
- containerPort: 8080
VS Code Extension
Docker extensions in environments such as VS Code let you see Docker registries and their images and push, pull, or delete them. You can also see the existing tags and easily copy their full names.