It is important to note that the image files downloaded from the Docker pool are identical to the official image files.
After installing Docker, you can use the official registry image to build a set of local private warehouse environments:
Docker run –d –p : Registry
After the input can wait, in fact, the local repository itself is a container , this command will download and create a registry container, create a local private warehouse.
By default, the warehouse is created in the container's Tmp/registry directory, and of course, the image file can be stored locally on the specified path by using the-v parameter.
Docker Run –d –p : v /opt/data/Registry: /tmp/Registry Registry
Then the local warehouse was built. For example, upload an Ubuntu image first.
Then you can manage this private repository, and you'll need to use the Docker tag command to mark the image as 127.0.0.1:500/ubuntu before uploading the image.
Docker Tag ubuntu:latest 127.0.0.1:/ubuntu
You can upload a tagged image using Docker pull:
Docker push 127.0.0.1:/ubuntu
When you get the image, just add 127.0.0.1:5000 to the front.
However, this is only available locally, because the Docker transport requires HTTPS, so there is no attempt to issue a certificate, so there is an opportunity to provide services to the outside.
Turn from: Dream Continuation code
Building and using a Docker private warehouse