Blogger Information
Blog 75
fans 0
comment 0
visits 54677
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
小猿圈linux之centos7 docker镜像加速器配置
聆听的博客
Original
603 people have browsed it

centos配置方式有点复杂,好多人在配置镜像加速器有点问题,小猿圈带你正确的配置,配置出错或者想要配置的朋友们可以看看小猿圈这则内容,希望能帮助你们。

CentOS的配置方式略微复杂,需要先将默认的配置文件复制出来

/lib/systemd/system/docker.service -> /etc/systemd/system/docker.service

然后再将加速器地址添加到配置文件的启动命令

重启Docker就可以了。

实例

cp -n /lib/systemd/system/docker.service /etc/systemd/system/docker.service
sudo sed -i "s|ExecStart=/usr/bin/docker daemon|ExecStart=/usr/bin/docker daemon --registry-mirror=https://gbpursha.mirror.aliyuncs.com|g" /etc/systemd/system/docker.service
sudo systemctl daemon-reload
sudo service docker restart

运行实例 »

点击 "运行实例" 按钮查看在线实例

是不是很简单,出错的朋友看看究竟错在哪里,如果感觉找不到原因,建议你按照小猿圈写的这篇重新配置一下,感觉小编写的好的可以看一下其他内容。
 

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!