1. Docker pull pulls the image When using
Docker will recognize IMAGE_NAME as an image with a domain name. For example, myregistry.io/space1/image1:latest, Docker will go to the server pointed to by myregistry.io to request the image data. A Docker image is divided into many layers. If the layer exists locally, it will not be pulled again.
Docker will concatenate IMAGE_NAME to docker.io/IMAGE_NAME to request the image data. In fact, $ docker pull docker.io/shaowenchen/images1 is equivalent to $ docker pull shaowenchen/images1. For the images provided by DockerHub, the access speed in China is slow, which can be accelerated by adding image sources. When pulling images, there may be two problems: 1. Pull the non-public image and prompt to log in Simply log in using docker login. In a non-interactive scenario, you can execute: $ echo "$DOCKER_PASSWORD" | docker login $REGISTRY -u "$DOCKER_USERNAME" --password-stdin 2. Mirror repository certificate error If the image repository server is specified in IMAGE_NAME, but the server does not provide a valid https service, the following configuration is required: In the /etc/docker/daemon.json file, add: { "insecure-registries": ["core.harbor.chenshaowen.com:5000"] } Restart Docker for the changes to take effect. 2. Modify the image source to speed up image pulling
In the /etc/docker/daemon.json file, add the mirror source { "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"] }
Edit the file /usr/lib/systemd/system/docker.service and add the registry-mirror parameter to the line containing ExecStart. ExecStart=... --registry-mirror=https://docker.mirrors.ustc.edu.cn Restart Docker for the changes to take effect. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. You may also be interested in:
|
<<: Vue custom components use event modifiers to step on the pit record
>>: Summary of problems that may occur when using JDBC to connect to Mysql database
Preface The reduce() method receives a function a...
Table of contents 1: Build webpack 2. Data hijack...
Table of contents webpack5 Official Start Buildin...
--When connecting to the database, the matching r...
Table of contents 1. What is a trigger? 2. Create...
Vue $http get and post request cross-domain probl...
<br />I am very happy to participate in this...
1. When inserting, updating, or removing DOM elem...
1. Execute SQL to view select @@session.sql_mode;...
Table of contents Preface Simulating data Merged ...
Table of contents 1. Process 2. Core Architecture...
<br />For every ten thousand people who answ...
Chinese documentation: https://router.vuejs.org/z...
When creating a MySQL container with Docker, some...
mysqldump command Introduction: A database backup...