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
Table of contents MySQL Shell import_table data i...
Nine simple examples analyze the use of HTML form...
Download Tomcat8 image [root@localhost ~]# docker...
The warning points in this article have nothing t...
Use OSS to upload pictures or attachments in vue ...
Mouse effects require the use of setTimeout to ge...
This article introduces how to solve the problem ...
Table of contents vue2.x Pre-concept: Routing hoo...
1. Paradigm The English name of the paradigm is N...
Table of contents Preface 1. for loop 2. while lo...
The first one: normal operation SELECT SUM(ddd) A...
Table of contents 1. Phenomenon 2. Solution 3. Su...
After installing wamp for the first time, all ser...
Project Scenario Add a custom watermark to the en...
Table of contents Preface 1. What is selenium? 2....