Docker离线安装

1.1 下载解压
# https://download.docker.com/linux/static/stable/x86_64/
wget -c https://download.docker.com/linux/static/stable/x86_64/docker-19.03.15.tgz
tar xf docker-19.03.15.tgz
chmod 755 docker/*
mv docker/* /usr/local/bin/
1.2 创建脚本
vim /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/local/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
#TasksMax=infinity
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target5
systemctl daemon-reload
systemctl start docker
systemctl status docker