linux centos7 rpm 离线安装docker

1.官方下载

https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

2.下载需要的rpm 包

containerd.io-1.2.6-3.3.el7.x86_64.rpm

docker-ce-19.03.8-3.el7.x86_64.rpm

docker-ce-cli-19.03.8-3.el7.x86_64.rpm

docker-ce-selinux-xxx 不用下载, 它已经被 docker-ce-cli-xxx 取代

3.上传服务器安装

rpm -Uvh *.rpm --nodeps --force

4.启动docker

#启动docker
systemctl start docker

#开机自启
systemctl enable docker

5.查看版本

[root@localhost Public]# docker version
Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b
 Built:             Wed Mar 11 01:27:04 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.8
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       afacb8b
  Built:            Wed Mar 11 01:25:42 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.6
  GitCommit:        894b81a4b802e4eb2a91d1ce216b8817763c29fb
 runc:
  Version:          1.0.0-rc8
  GitCommit:        425e105d5a03fabd737a126ad93d62a9eeede87f
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

 

更多配置请参考 官网

你可能感兴趣的:(docker,centos7)