1、安装
yum -y install docker-io 或 curl -fsSL https://get.docker.com/ | sh
2、修改防火墙
yum -y install iptables
systemctl disable firewalld.service
systemctl enable iptables.service
systemctl start iptables.service
3、修改配置文件
在/etc/sysconfig/docker文件添加以下选项:
other_args='--insecure-registry 10.44.86.222:5000 --graph=/data/docker/images'
-insecure-registry 对于特定注册启用非安全通信(对于HTTPS没有证书校验,启用HTTP启用fallback)
--graph 指定本地images存放路径
3、启动
systemctl start docker.service
本文转自aaron428 51CTO博客,原文链接:http://blog.51cto.com/aaronsa/1728261,如需转载请自行联系原作者