Building and using a Docker private warehouse

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.