天天看點

docker安裝

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,如需轉載請自行聯系原作者