The image can be easily pushed directly to the Docker public repository, just like GitHub, but we often don't want to make the image file public during development. In this case, we need to build a Docker private repository, just like GitLab. After building the image in the previous article, we can deploy a private image repository to store our image. Start a private registry Starting a private repository is also very simple. Execute the command on the server Copy the code as follows: docker run -d -p 5000:5000 --name="docker-registry" --restart=always -v /root/docker/registry/:/var/lib/registry/ registry That is, the container built by the registry image is started in the background and named Why After successfully executing the Upload image To upload an image to a private repository, you need to add the repository address to the image tag: docker tag express-app 111.111.111.111:5000/sunhengzhe/express-app:v1 In order to avoid conflicts with other images, you can add a namespace such as Note that the repository address does not include the protocol part. The default security policy of Docker requires that the repository supports Mac configuration After the change, you need to CentOS system Write in the { "registry-mirror": [ "https://registry.docker-cn.com" ], "insecure-registries": [ "[private warehouse ip:port]" ] } Then restart docker systemctl restart docker Push image After typing docker push 111.111.111.111:5000/sunhengzhe/express-app:v1 Push failed If the problem of docker logs -f docker-registry If chcon -Rt svirt_sandbox_file_t /root/docker/registry/ In this example, it is Pull the image Use the docker pull 111.111.111.111:5000/sunhengzhe/express-app:v1 The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: mysql5.7.19 winx64 decompressed version installation and configuration tutorial
>>: Detailed explanation of the cache implementation principle of Vue computed
There is a new build tool in the Vue ecosystem ca...
Let's look at the case first. Use vue+swiper ...
Newbie, record it yourself 1. Install supervisor....
XML is designed to describe, store, transmit and ...
You can often see articles about CSS drawing, suc...
Implementing process analysis (1) How to call rep...
Table of contents What is a container data volume...
Vue2+elementui's hover prompts are divided in...
1. Command Introduction The stat command is used ...
File transfer between Windows and Linux (1) Use W...
Table of contents Filters 01.What is 02. How to d...
This article shares the specific code for the WeC...
Preface MySQL query uses the select command, and ...
Table of contents 1. Reduce the number of image l...
This article uses an example to describe how to r...