In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the construction and use of docker private warehouse". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Download the repository image
Docker pull registry
two。 Create a private warehouse container-d means the background starts
Docker run-d-p 5000UR 5000-v / opt/data/registry:/var/lib/registry registry
3. Firewall removes port 5000 restriction
Firewall-cmd-zone=public-add-port=5000/tcp-permanent
4. Verify whether the private warehouse has been started successfully
Http://192.3.8.12:5000/v2
5. Package image
Docker tag my-nginx:v1 192.168.56.200:5000/centos
6. Upload the packaged image to the private warehouse
[root@server1 ~] # docker push 192.168.56.200:5000/centosthe 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 due to the fact that the client uses https,docker registry instead of https services. One way to handle this is to change the customer's request for the address "192.168.56.200 http 5000".
Solution:
In the / etc/docker/ directory, create a "daemon.json" file. Write in the file: {"insecure-registries": ["192.168.56.200 insecure-registries 5000"]}
After saving and exiting, restart docker.
7. There is a problem again when uploading again, because selinux is not turned off. Use the setenforce 0 command to set temporary shutdown, or vi / etc/sysconfig/selinux to change the line inside to selinux=disabled and save it, and then restart it. )
8. View the images in the private repository
Http://192.3.8.187:5000/v2/_catalog
9. This downloads the image of the private repository on server2.
Docker pull 192.168.56.200:5000/centos
10. Backup and restore of warehouse images.
Directly back up / opt/data/registry on a regular basis, and restore can be started directly by hanging to the docker-registry image.
Docker run-d-p 5000 5000-v / opt/data/registry:/var/lib/registry registry "how to build and use docker private warehouse" ends here. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.