Docker-5 Docker Warehouse

Source: Internet
Author: User
Tags docker ps docker run

Docker deployment Environment: CentOS release 6.5 (Final)

1. Edit the Docker configuration file because the registry service we started is not secure and trustworthy. So we need to modify the Docker configuration file,

[Email protected]]# vim/etc/sysconfig/Dockerother_args="--insecure-registry= 192.168.1.243:5000-h tcp://0.0.0.0:235-h unix:///var/run/docker.sock"

2. After modifying the configuration file, restart Docker

[Email protected]]#/etc/init.d/docker Restart

3. Get registry

[Email protected]]# Docker Pull Registry

4. Start Registry

[[Email protected]]# Docker run-d-P 5000:5000-v/opt/data/registry:/var/lib/registry Registry

[Email protected]]# Docker ps-l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0e600f830f51 registry "/entrypoint.sh/etc minutes ago up 2 seconds 0.0.0.0:5000->5000/tcp Drunk_albattani

The Registry service defaults to storing the uploaded image in the container's/var/lib/registry, and we mount the host's/opt/registry directory to that directory, which allows the image to be saved to the host's/opt/registry directory.

At this point in the browser input: http://IP:5000/v2/

will return a {}

5, do tag tag

[[email protected] root]# Docker imagesrepository TAG IMAGE ID CREATED VIRTUAL sizept/tomcat_biz v1 F56C998AC2F3Panax NotoginsengHours ago756.3Mbcentos Latest 97cad5e16cb66Days ago196.5mbregistry Latest 5c929a8b587a3Weeks ago33.27Mb[[email protected] root]# docker tag Centos:latest10.116.208.166: the/test/CENTOS:V1 [[email protected] root]# Docker imagesrepository TAG IMAGE ID CREATED VIRTUAL sizept/tomcat_biz v1 F56C998AC2F3Panax NotoginsengHours ago756.3Mbcentos Latest 97cad5e16cb66Days ago196.5MB10.116.208.166: the/test/centos v1 97CAD5E16CB66Days ago196.5mbregistry Latest 5c929a8b587a3Weeks ago33.27MB

6. Push to Registry

10.116. 208.166:/test/centos:v1the push refers to a repository [10.116.  208.166:1) 97cad5e16cb6:image already exists 05fe84bf6d3f:image already exists Af0819ed1fac:image successfully pushed 3690474eb5b4:image already exists digest:sha256 : 31879c6c05e2cb19300a12a685998f4d45f924f48a7d7d215846c9511f40176c

7, open another server, do pull test

10.116. 208.166:/test/centos:v1

At this end, the private warehouse is built.

Docker-5 Docker 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.