Docker Local Warehouse Setup

Source: Internet
Author: User
Tags docker run

First, the environment

System: CENTOS7

Version: 3.10.0-229.el7.x86_64

Second, Registry mirror

1. Download Registry image

sudo docker pull Register

2. Start a container

By default, the warehouse is stored in the container's/tmp/registry directory, so if the container is deleted, the image stored in the container will be lost, so a local directory will typically be specified to mount under the container (-V to implement the Mount function)

sudo docker run-d-p 5000:5000-v/data/registry:/tmp/registry Registry

3. Access to private warehouse verification

Curl Http://192.168.10.60:5000/v1/search


Third, upload to the warehouse

1, push times wrong resolution method

Vim/etc/sysconfig/docker

Options= '--selinux-enabled--insecure-registry 192.168.10.60:5000 '

sudo systemctl restart Docker

2. Make a label for the base image

sudo docker tag lly 192.168.10.60:5000/liuly

3. Upload to Warehouse

sudo docker push 192.168.10.60:5000/liuly

4. Access to the warehouse verification

Curl Http://192.168.10.60:5000/v1/search

5. View the image saved to the local directory

Ls/data/registry

Docker Local Warehouse Setup

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.