Docker – tar包安装Docker

下载

  各个版本Docker地址:https://download.docker.com/linux/static/stable/x86_64/

安装

1.解压

`tar zxvf docker-19.03.2.tgz` 

2.将解压后目录中文件移动到/usr/bin/下

`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` 

7.拉取镜像

`docker pull centos` 

在这里插入图片描述