1. Download the repository image docker pull registry 2. Create a private warehouse container -d means background start docker run -d -p 5000:5000 -v /opt/data/registry:/var/lib/registry registry 3. Remove the 5000 port restriction from the firewall firewall-cmd --zone=public --add-port=5000/tcp --permanent 4. Verify whether the private warehouse is started successfully http://192.3.8.12:5000/v2 5. Packaging image docker tag my-nginx:v1 192.168.56.200:5000/centos 6. Upload the packaged image to a private warehouse [root@server1 ~]# docker push 192.168.56.200:5000/centos The push refers to a repository [192.168.56.200:5000/centos] Get https://192.168.56.200:5000/v1/_ping: http: server gave HTTP response to HTTPS client This problem may be caused by the client using https, but the docker registry does not use https service. One way to handle this is to change the client's request to the address "192.168.56.200:5000" to http. Solution: In the "/etc/docker/" directory, create the "daemon.json" file. Write in the file: After saving and exiting, restart Docker. 7. The problem occurred again when uploading again, because selinux was not turned off. (Use the setenforce 0 command to temporarily disable it, or you can run vi /etc/sysconfig/selinux and change the line inside to SELINUX=disabled, save the change, and then reboot.) 8. View the image in the private warehouse 9. In this way, the image of the private warehouse is downloaded on server2. docker pull 192.168.56.200:5000/centos 10. Backup and restore of warehouse images. Directly back up /opt/data/registry regularly, and restore it by directly hanging it under the docker-registry image and starting it. docker run -d -p 5000:5000 -v /opt/data/registry:/var/lib/registry registry The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Super simple qps statistics method (recommended)
>>: Vue commonly used high-order functions and comprehensive examples
There are two files a.htm and b.htm. In the same d...
What to do if you forget Windows Server 2008R2 So...
Table of contents 1. Vertical (longitudinal) slic...
MySQL binlog is a very important log in MySQL log...
Parent File import React, { useState } from '...
Required effect: After clicking to send the verif...
The following code introduces Chrome's monito...
How to determine whether the current Linux system...
Table of contents 1. Project Description: 2. Proj...
This article shares the specific code for JavaScr...
It is mainly a CSS style control and a META tag; C...
7 ways to implement a two-column layout with fixe...
Table of contents What is FormData? A practical e...
Table of contents Demo1 create_fragment SvelteCom...
Preface In the past, the company used the 5.7 ser...