centos for docker offline deployment
- Download the offline installation package of the centos version of docke
Download address: https://download.docker.com/linux/static/stable/x86_64/.
- Upload the downloaded installation package to the directory you want to put it in
-
Decompress the compressed package
#解压压缩包 tar -zxvf docker-18.03.1-cd.tgz #将解压文件中的文件复制到/usr/bin目录下 cp /docker/* /user/bin
-
Configure docker.service
#配置docker.service 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 #注:必须实在此路径下,不然docker启动失败 ExecReload=/bin/kill -s HUP $MAINPID LimitNOFILE=infinity LimitNPROC=infinity TimeoutStartSec=0 Delegate=yes KillMode=process Restart=on-failure StartLimitBurst=3 StartLimitInterval=60s [Install] WantedBy=multi-user.target #重启配置文件,使文件生效 systemctl daemon-reload #启动docker服务 systemctl start docker #查看docker服务的状态 systemctl status docker
Note: Be sure to turn off the linux firewall when deploying docker, otherwise it is easy to report an error when starting the docker service! ! !