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

Mysql accidental deletion of data solution and kill statement principle

mysql accidentally deleted data Using the delete ...

Flex layout achieves fixed number of rows per line + adaptive layout

This article introduces the flex layout to achiev...

JavaScript implements the nine-grid mobile puzzle game

This article shares the specific code for JavaScr...

Simple steps to create a MySQL container with Docker

Preface We have already installed Docker and have...

How to set the number of mysql connections (Too many connections)

During the use of mysql, it was found that the nu...

Vue dynamic menu, dynamic route loading and refresh pitfalls

Table of contents need: Ideas: lesson: Share the ...

In-depth reading and practice records of conditional types in TypeScript

Table of contents Using conditional types in gene...

Use Nginx to build a streaming media server to realize live broadcast function

Written in front In recent years, the live stream...

Solution to MySQL failure to start

Solution to MySQL failure to start MySQL cannot s...

Docker data volume container creation and usage analysis

A data volume container is a container specifical...

Excel export always fails in docker environment

Excel export always fails in the docker environme...

MySQL spatial data storage and functions

Table of contents 1. Data Type 1. What is MySQL s...

Detailed explanation of two ways to dynamically change CSS styles in react

The first method: dynamically add a class to show...