Home >Operation and Maintenance >Docker >docker adds domestic image

docker adds domestic image

王林
王林forward
2021-01-07 11:28:157205browse

docker adds domestic image

Students who have used docker know that the default image address of docker is very slow when pulling the image, and may even time out. To solve this problem, we can add a domestic mirror address.

(Learning video sharing: Programming video)

1. Domestic acceleration address

Docker China official image

https://registry.docker-cn.com

NetEase

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

ustc

https://docker.mirrors.ustc.edu.cn

University of Science and Technology of China

https://docker.mirrors.ustc.edu.cn

Alibaba Cloud Container Service

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

Click "Create my container image" on the homepage to get a dedicated image acceleration address, similar to "https://1234abcd.mirror.aliyuncs.com"

2. Add method

2.1 Add "https://registry.docker-cn.com" to the registry-mirrors array.

[root@localhost ~]# vim /etc/docker/daemon.json 
{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}
[root@localhost ~]# systemctl restart docker.service

2.2 Use command mode to add

[root@localhost ~]# dockerd --registry-mirror=https://registry.docker-cn.com

Related recommendations: docker tutorial

The above is the detailed content of docker adds domestic image. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete

Related articles

See more