|
|
把下面的代码,保存到 /etc/docker/daemon.json 配置文件里 |; m+ h0 P: b A7 Q' c
- {0 e I' [, N5 `5 X) J1 S7 u
- "registry-mirrors":["https://mirror.ccs.tencentyun.com",- A' z+ T F% G+ n+ J7 D0 t% d) g0 W
- "https://ccr.ccs.tencentyun.com",4 |' I* ?! @4 d
- "http://f1361db2.m.daocloud.io",
5 R6 D9 e# _* s$ V, K4 _0 P$ o - "https://dockerproxy.com",, _: u0 v* l& P. u* u
- "https://hub-mirror.c.163.com",
6 h& l' @ i. N! J( Y1 x! O; e' m - "https://ung2thfc.mirror.aliyuncs.com",/ n4 P. ^: ?- F- u& C8 \
- "https://mirror.baidubce.com",+ {$ A: ?* b3 d4 s2 q# p* @
- "https://registry.docker-cn.com",
/ U1 [- j9 ]; b - "https://reg-mirror.qiniu.com",
9 ?( Z6 F& C1 `" l - "https://dockerhub.azk8s.cn",
" q5 f I$ W- u" `5 c& Z& x! s - "https://docker.mirrors.ustc.edu.cn"]
7 h5 B8 q$ k3 v5 Z# V: |3 v" H - }
5 Z: ~" R& O5 W R( k
复制代码
2 y1 P- v# o& U6 F6 c1 E6 N# o( |* W) a# O! e! {
保存后,执行以下命令,重启 Docker 即可。示例命令以 CentOS 7 为例。9 Q! p8 \$ z2 l% }
' [ U$ q6 {& K7 t9 ^) X3 y
- sudo systemctl restart docker
复制代码 |
|