下载
各个版本Docker地址:https://download.docker.com/linux/static/stable/x86_64/
1.上传、解压
mkdir /usr/local/docker
mv docker-19.03.2.tgz /usr/local/docker
tar zxvf docker-19.03.2.tgz
2.将解压后目录中的文件移动到/usr/bin/下
cd /usr/local/docker/
cp docker/* /usr/bin/
3.检查安装
docker version
4.配置 docker.service文件
vi /usr/lib/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
TimeoutStartSec=0
Delegate=yes
KillMode=process
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target
5.启动dockerd服务进程
systemctl daemon-reload
systemctl start docker
6.检验
ps aux | grep docker