Docker builds its own private warehouse

Source: Internet
Author: User
Tags docker ps docker run

Environment:

centos7.1

Network: 192.168.10.100

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8B/9B/wKioL1hSwVzypaIiAAAd4eDQrdk775.png "title=" 1.png " alt= "Wkiol1hswvzypaiiaaad4edqrdk775.png"/>

First, pull down the warehouse image

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8B/9C/wKioL1hSwgeyqsqgAAEcefmJgE4705.png "title=" 2.png " alt= "Wkiol1hswgeyqsqgaaecefmjge4705.png"/>

By default, the repository is created in the container's/tmp/registry directory, but you can use the-v parameter to place the image file locally on the specified path, as an example of placing the uploaded image in the/opt/data/registry directory

Docker run-d-P 5000:5000-v/opt/data/registry:/tmp/registry Registry

查看运行的容器

Docker Ps-a

Create a mirrored link or label a base image

Docker Tag Registry 127.0.0.1:5000/ssh

Submit the image to a local private warehouse

Docker Push 127.0.0.1:5000/ssh


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8B/9E/wKioL1hS1IexxXTzAAGMQc9xEFw424.png "title=" 3.png " alt= "Wkiol1hs1iexxxtzaagmqc9xefw424.png"/>

Pull test 650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8B/A2/wKiom1hS1unCdpFXAABHpl753BU173.png "title = "4.png" alt= "Wkiom1hs1uncdpfxaabhpl753bu173.png"/>

If the pull times error is wrong with HTTPS, you can try the following methods to test

/usr/lib/systemd/system/docker.service

Point to server-side address and port number

Execstart=/usr/bin/dockerd--insecure-registry 127.0.0.1:5000



This article is from the "Silence" blog, make sure to keep this source http://silencezone.blog.51cto.com/3613477/1883215

Docker builds its own 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.