Docker离线部署
docker源码包下载地址:
https://download.docker.com/linux/static/stable/x86_64/
docker中文文档:
http://www.dockerinfo.net/document
Docker离线部署
该部署使用的Centos7为例
1.下载docker源码包并将其解压
tar -zxvf docker-17.03.0-ce.tar
2.将解压文件复制到/usr/bin
cp docker/* /usr/bin/
3.配置docker启动命令文件
vi /etc/systemd/system/docker.service
[Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network-online.target firewalld.service Wants=network-online.target [Service] Type=notify ExecStart=/usr/bin/dockerd ExecReload=/bin/kill -s HUP $MAINPID LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity TimeoutStartSec=0 Delegate=yes KillMode=process Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target
4.增加执行权限
chmod +x /etc/systemd/system/docker.service
5.重新加载unit配置文件
systemctl daemon-reload
6.启动docker服务
systemctl start docker
7.设置开机自启
systemctl enable docker.service
8.查看docker状态
systemctl status docker