yum安装依赖包

yum -y instll yum-utils device-mapper-persistent-data lvm2

获取下载20.x版本docker源

yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

yum安装docker-ce

yum -y install docker-ce

启动docker

systemctl start docker
systemctl status docker

查看dockers版本

docker --version
Docker version 20.10.7, build f0df350

下载并启动hello-world查看是否成功

docker run hello-world

latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:5122f6204b6a3596e048758cabba3c46b1c937a46b5be6225b835d091b90e46c
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

相关文章:

  • 2021-09-24
  • 2022-12-23
  • 2021-12-03
  • 2022-01-12
  • 2022-02-03
  • 2021-12-13
  • 2021-06-11
  • 2021-09-07
猜你喜欢
  • 2021-06-04
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2021-08-16
  • 2022-12-23
相关资源
相似解决方案