Docker learning six--private library installation configuration using

Source: Internet
Author: User
Tags centos docker run
1, after the installation of Docker, you can easily set up a private warehouse through registry image.
[root@ip-10-249-100-205 ~]# Docker run-d-P 5000:5000 Registry
Automatically launches a registry container after the download completes, creating a local private warehouse service.
By default, the warehouse is created in the container's/tmp/registry directory, and you can use the-v parameter to store the mirrored Wenjiang in a locally specified path.
Docker run-d-P 5000:5000-v/data/registry:/tmp/registry Registry

2, the client on the test
Change tag Information First
[Root@bogon ~]# docker tag Docker.io/centos:latest 10.249.100.205:5000/centos
[Root@bogon ~]# Docker Images
REPOSITORY TAG IMAGE ID CREATED SIZE
192.168.202.12:5000/BF-REPORTS/LOGC latest 13cbc1051e26 2 days ago 206.4 MB
192.168.202.12:5000/bf-reports/web latest 83a6f662cb77 2 days ago 204.7 MB
192.168.202.12:5000/bf-reports/app latest 4982bb69ba1d 2 days ago 215.1 MB
HUB.C.163.COM/LOVEGO/XIAOMEI/LOGC latest 7a8cdeef9fc7 9 weeks ago 206.4 MB
Docker.io/registry latest 177391bcf802 3 months ago 33.26 MB
10.249.100.205:5000/centos latest 3fa822599e10 3 months ago 203.5 MB
Docker.io/centos latest 3fa822599e10 3 months ago 203.5 MB
Hub.c.163.com/lovego/xiaomei/nginx latest 0c8707e1f509 3 months ago 197.6 MB
Hub.c.163.com/lovego/xiaomei/appserver latest 1d5230131e77 3 months ago 190.6 MB
----------------------------------------------------
Problem:
[Root@bogon ~]# Docker push 10.249.100.205:5000/centos
The push refers to a repository [10.249.100.205:5000/centos]
Get Https://10.249.100.205:5000/v1/_ping:http:server gave HTTP response to HTTPS client
Processing
[Root@bogon ~]# Vi/etc/docker/daemon.json
{"Insecure-registries": ["10.249.100.205:5000"]}
--------------------------------------------------
Restart
[Root@bogon ~]# Service Docker restart
Redirecting To/bin/systemctl restart Docker.service
[Root@bogon ~]# Docker push 10.249.100.205:5000/centos
The push refers to a repository [10.249.100.205:5000/centos]
D1be66a59bc5:pushed
Latest:digest:sha256:3a32a170c945ffe18334b3f514fcb66f9c14001b2266c9ed8504c72db0acde11 size:529
Uploading to a private library
[Root@bogon ~]# Docker push 10.249.100.205:5000/test
The push refers to a repository [10.249.100.205:5000/test]
32fe1ce02eb9:pushed
C07e996d727b:pushed
4b6aec5030f1:pushed
Ccb7ab190dd6:pushed
Df7cd7f81dc3:pushed
28f6de911d7d:pushed
174a611570d4:pushed
F51f76255b02:pushed
51db18d04d72:pushed
F1c896f31e49:pushed
0f5ff0cf6a1c:pushed
latest:digest:sha256:4a161fe6e9d5cdd01bd59bdaad17ce68b5bb60e9df6cec7c52c93ae2ce578485 size:2611
Download
[Root@localhost registry]# Docker Pull 10.249.100.205:5000/test
Using default Tag:latest
Trying to Repository 10.249.100.205:5000/test ...
Latest:pulling from 10.249.100.205:5000/test
digest:sha256:4a161fe6e9d5cdd01bd59bdaad17ce68b5bb60e9df6cec7c52c93ae2ce578485
[Root@localhost registry]# Docker Images
REPOSITORY TAG IMAGE ID CREATED SIZE
10.249.100.205:5000/test latest 0c8707e1f509 3 months ago 197.6 MB

3. Enter the container to view the image of the upload success
/var/lib/registry/docker/registry/v2/repositories # ls
CentOS Test Wolf
Success

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.