How Do I Build a Private Docker Image Repository?
CCE works with Software Repository for Container (SWR) to create Docker images. SWR can also be used as an independent container image repository.
SWR FAQs
Procedure
- Run the following command provided by Docker to build a private image repository:
docker run –d –p 5000:5000 –v /opt/data/registry:/tmp/registry –restart=always –name= registry-v2-test registry:2
- By default, Docker interacts with repositories using the HTTPS protocol. In this example, the private repository uses the HTTP protocol. In this case, add --insecure-registry=192.168.6.94:5000 to the Docker configuration file /usr/lib/systemd/system/docker.service, as shown in the following figure.

- Run the following command to restart the Docker client:
systemctl daemon-reload
systemctl restart docker
- Tag the image before uploading it to the repository.
docker tag <Current image name> <Target image name>
- Upload the image.
docker push <Image name>
After the preceding operations are performed, the image can be uploaded to the local private repository.
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.