Construction verification of Docker private warehouse registry

Source: Internet
Author: User
Tags docker ps docker hub

1. About Docker Registry

Official website Docker hub

RegistryInGitHubThere are two code: the old code base and the new code base. The old code is usedPythonWritten, existPull and push performance issues, out to 0.9.1 deprecated2.0 version started to be developed in the new code base, and the new code base was implemented in go language, modified the mirror id registry pullpush mirror efficiency.

2. Registry Deployment

Run a command to get registry, currently the latest version is 2.3.1

Docker Pull registry:2.3. 1

Start a container

Docker run-d-v/opt/registry:/var:--restart=always --name Registry registry:  2.3. 1

The Registry Service will save the uploaded image in the container's /var/lib/registry by default, and we will mount the host's /opt/registry directory to this directory to save the image to the host / the Opt/registry directory.

Run Docker PS and look at the container case

CONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS              PORTS                    names2355477e3c21        registry:2.3.  1   "/bin/registry/etc/d"   3 hours ago         3 Hours          0.0.  0.0:/tcp   Registry

Instructions we have started the registry service, open the browser input http://127.0.0.1:5000/v2, the following situation shows that registry is working properly

3. Verify that the registryimage push to the local image library, we will flag the image as being pushed to the private warehouse via Docker tag
Docker Tag registry:2.3. 1 127.0. 0.1:/registry:2.3. 1

Then look at the following local mirrors, using the instructions

Docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE127.0.  0.1:/registry                 2.3.  1               60e8332136e4        3 months ago        224.5  mbregistry                    2.3 . 1               60e8332136e4        3 months ago        224.5 MB

Push the mirror to the local mirror library

127.0.0.1:5000/registry:2.3.1

Construction verification of Docker private warehouse registry

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.