In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Access to Docker warehouse
A Repository is a place where images are centrally stored, which is divided into a common warehouse and a private warehouse. The registration server is different from the warehouse. A registration server can have multiple warehouses, and each warehouse can have multiple images. The warehouse can be considered as a specific project or directory. For example, private-docker.com/ubuntu private-docker.com is the address of the registration server, and ubuntu is the name of the warehouse.
Public mirror market
Docker Hub is the largest public image repository officially provided by docker. Most of the image requirements of https://hub.docker.com can be downloaded directly from Docker hub.
1. Log in. You can enter the user name, password and email by executing the docker login command to complete the registration and login. After successful registration, the local user directory will automatically wear a .docker / config.json file to save the user's authentication information.
2. Basic operation. Users can use the docker search command to find the image of the official repository without logging in, and use the docker [image] pull command to download it to the pull.
3. Automatic creation is an automatic service provided by docker hub, which can automatically update the project code and rebuild the image. For example, if you have created an application image, you need to manually follow the new image if a new version is released. Automatic creation allows users to specify a project on a target site through docker hub, and automatically perform creation when the project changes.
1) create a login Docker Hub
2) allow Docker Hub to access the service in the target website
3) configure an automatically created project in Docker Hub
4) Select a project and branch in a target site
5) specify the location of the Dockerfile and submit it for creation.
Build a local private warehouse
Use registry to create a private image and start it. The warehouse will be created in the container's / var/lib/registry directory, and the image files will be stored in the specified directory (local / opt/data/registry) using the-v parameter.
[root@docker01] # docker run-d-p 5000 registry:2' locally2 / opt/data/registry:/var/lib/registry registry:2Unable to find image 'registry:2' locally2: Pulling from library/registry486039affc0a: Pull complete ba51a3b098e6: Pull complete 8bb4c43d6c8e: Pull complete 6f5f453e5f2d: Pull complete 42bc10b72f42: Pull complete Digest: sha256:7d081088e4bfd632a88e3f3bcd9e007ef44a796fddfe3261407a3f9f04abe1e7Status: Downloaded newer image for registry:27166c8c34d7ff45d5e9200909ea17cebfd3894852cf1f49ee9e944ea1218fd9a
View an existing mirror and use tag to modify the mirror mark as 10.10.17.199:5000/test
[root@docker01 ~] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEubuntu 18.04 72300a873c2c 2 weeks ago 64.2MB [root@docker01 ~] # docker tag ubuntu:18.04 10.10.17.199:5000/test
Uploading tag image directly will report an error.
[root@docker01 ~] # docker push 10.10.17.199:5000/testThe push refers to repository [10.10.17.199:5000/test] Get https://10.10.17.199:5000/v2/: http: server gave HTTP response to HTTPS client
Modify the daemon.json file, reload and restart docker, start registry
[root@docker01 ~] # vim / etc/docker/daemon.json {"insecure-registries": ["10.10.17.199insecure-registries 5000"] [root@docker01 ~] # systemctl daemon-reload [root@docker01 ~] # systemctl restart docker [root@docker01 ~] # docker run-d-p 5000insecure-registries 5000-v / opt/data/registry:/var/lib/registry registry:2b3e4503d76bf818f4d4a8cbb399f2826c335a97d5bae6b21d66d671c4983d99f
Upload tag image
[root@docker01 ~] # docker push 10.10.17.199:5000/testThe push refers to repository [10.10.17.199:5000/test] 1852b2300972: Pushed 03c9b9f537a4: Pushed 8c98131d2d1d: Pushed cc4590d6a718: Pushed latest: digest: sha256:0925d086715714114c1988f7c947db94064fd385e171a63c07730f1fa014e6f9 size: 1152
Test, delete the original 10.10.17.199:5000/test, and then pull one down
[root@docker01 ~] # docker rmi 10.10.17.199:5000/testUntagged: 10.10.17.199:5000/test:latestUntagged: 10.10.17.199:5000/test@sha256:0925d086715714114c1988f7c947db94064fd385e171a63c07730f1fa014e6f9 [root@docker01 ~] # docker pull 10.10.17.199:5000/testUsing default tag: latestlatest: Pulling from testDigest: sha256:0925d086715714114c1988f7c947db94064fd385e171a63c07730f1fa014e6f9Status: Downloaded newer image for 10.10.17.199:5000/test:latest10.10.17.199:5000/test:latest [root@docker01 ~] # docker ImagesREPOSITORY TAG IMAGE ID CREATED SIZE10.10.17.199:5000/test latest 72300a873c2c 2 weeks ago 64.2MBubuntu 18.04 72300a873c2c 2 weeks ago 64.2MB
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.