How to change the domestic image source for Docker

How to change the domestic image source for Docker

Configure the accelerator for the Docker daemon

Start Docker through the configuration file, modify the /etc/docker/daemon.json file and add the registry-mirrors key value.

vim /etc/docker/daemon.json
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}

After saving the changes, restart Docker for the configuration to take effect.

service docker restart

Additional knowledge: Docker configuration image accelerator

Change the default mirror source to a domestic mirror source to increase download speed

Configuration Files:

cat > /etc/docker/daemon.json << EOF
{
 "registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"]
}
EOF

Restart the service:

systemctl restart docker

docker info can check what the current image accelerator is

Other image accelerators

NetEase: http://hub-mirror.c.163.com

Alibaba: https://cr.console.aliyun.com

Docker China site: https://registry.docker-cn.com

The above operation of changing the domestic image source for Docker is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • How to use Docker to package and deploy images locally
  • Docker renames the image name and TAG operation
  • How to view files in Docker image
  • How to use Docker buildx to build multi-platform images and push them to private repositories
  • Issues with using Azure Container Registry to store images

<<:  Detailed tutorial for installing the unzipped version of mysql5.7.28 winx64 on windows

>>:  HTML markup language - reference

Recommend

Understand the basics of Navicat for MySQL in one article

Table of contents 1. Database Operation 2. Data T...

Steps for encapsulating element-ui pop-up components

Encapsulate el-dialog as a component When we use ...

Detailed explanation of formatting numbers in MySQL

Recently, due to work needs, I need to format num...

SQL implementation of LeetCode (184. The highest salary in the department)

[LeetCode] 184. Department Highest Salary The Emp...

Tomcat parses XML and creates objects through reflection

The following example code introduces the princip...

How to prevent computer slowdown when WIN10 has multiple databases installed

Enable the service when you need it, and disable ...

How to successfully retrieve VMware Esxi root password after forgetting it

Prepare a CentOS6 installation disk (any version)...

Several ways to add timestamps in MySQL tables

Scenario: The data in a table needs to be synchro...

Detailed tutorial on installing mysql 8.0.13 (rpm) on Centos7

yum or rpm? The yum installation method is very c...

Ubuntu opens port 22

Scenario You need to use the xshell tool to conne...

MySQL date processing function example analysis

This article mainly introduces the example analys...