The image of the microservice will be uploaded to the Docker repository for storage. Commonly used public Docker repositories include Alibaba Cloud, NetEase Cloud, etc. You can also build your own Docker private repository in the enterprise LAN. This tutorial uses the private repository registry provided by Docker. 1. Pull the private warehouse image docker pull registry 2. Create and start a private warehouse container docker run -dit -v /data/registry:/var/lib/registry -p 5000:5000 --restart=always --name docker-registry registry Parameter Description
The above shows that the registry image has been created and the docker-registry container has been started successfully. Visit: http://139.9.40.41:5000/v2/_catalog, the response result is as follows: {"repositories":[]} The above response result shows that there is no image in the Docker private repository. By default, docker-registry only allows https to submit images. The following configuration enables docker-registry to support http. Under /etc/docker, create a daemon.json file and write: { "insecure-registries": [ "139.9.40.41:5000"] } 3. Restart Docker systemctl restart docker 4. Upload the image to a private warehouse Mark this image as a private repository image docker tag docker.io/hello-world 139.9.40.41:5000/hello-world:v1 Upload a tagged image docker push 139.9.40.41:5000/hello-world:v1 List all images [root@2 docker]# curl http://139.9.40.41:5000/v2/_catalog {"repositories":["hello-world"]} 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:
|
<<: A brief analysis of the best way to deal with forgotten MySQL 8 passwords
>>: Native JS to implement the aircraft war game
Using NULL in comparison operators mysql> sele...
Table of contents Hidden, descending, and functio...
Preface In the previous interview process, when a...
Preface Vue Router is the official routing manage...
What are slots? We know that in Vue, nothing can ...
All consecutive spaces or blank lines (newlines) ...
Hello everyone, I am Liang Xu. When using Linux, ...
<!DOCTYPE html> <html lang="en"...
Table of contents 1. Parent passes value to child...
Table of contents Preface 1. Understanding with e...
Table of contents 1. Introduction: In this case, ...
This article shares the specific code of js to im...
When receiving this requirement, Baidu found many...
Table of contents 1. isPrototypeOf() Example 1, O...
There are two ways: 1. Service method Check the f...