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

Avoid abusing this to read data in data in Vue

Table of contents Preface 1. The process of using...

Nginx access log and error log parameter description

illustrate: There are two main types of nginx log...

Detailed explanation of Xshell common problems and related configurations

This article introduces common problems of Xshell...

JS quickly master ES6 class usage

1. How to construct? Let's review the common ...

12 types of component communications in Vue2

Table of contents 1. props 2..sync 3.v-model 4.re...

Express implements login verification

This article example shares the specific code for...

Several implementation methods of the tab bar (recommended)

Tabs: Category + Description Tag bar: Category =&...

How to install vncserver in Ubuntu 20.04

Ubuntu 20.04 has been officially released in Apri...

Implementation of nginx worker process loop

After the worker process is started, it will firs...

A brief talk about calculated properties and property listening in Vue

Table of contents 1. Computed properties Syntax: ...

How to implement the King of Glory matching personnel loading page with CSS3

Those who have played King of Glory should be fam...

Detailed explanation of js event delegation

1. Each function is an object and occupies memory...

Detailed explanation of this reference in React

Table of contents cause: go through: 1. Construct...

Pure HTML+CSS to achieve Element loading effect

This is the effect of the Element UI loading comp...