centos8.2版本下如何安装docker

步骤

  1. 安装yum-utils
[root@docker yum.repos.d]# yum install -y yum-utils
  1. 配置国内源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  1. 安装docker
yum install -y docker-ce docker-ce-cli  containerd.io --nobest

因为centos8中已经安装了containerd.io,所以我们加上--nobest参数,让他自己选择相应的包即可

Docker——Centos8.2安装Docker

  1. 查看docker版本
[root@docker yum.repos.d]# docker -v
Docker version 19.03.13, build 4484c46d9d
  1. 启动docker
systemctl start docker
  1. 运行hello world容器
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete
Digest: sha256:7f0a9f93b4aa3022c3a4c147a449bf11e0941a1fd0bf4a8e6c9408b2600777c5
Status: Downloaded newer image for hello-world:latest
Hello from Docker!

相关文章:

  • 2022-01-12
  • 2021-11-22
  • 2021-07-23
  • 2022-01-29
  • 2021-06-26
  • 2021-09-22
  • 2022-03-09
  • 2021-11-27
猜你喜欢
  • 2022-12-23
  • 2021-09-25
  • 2021-04-04
  • 2021-12-04
  • 2021-10-07
  • 2022-01-12
  • 2021-09-03
相关资源
相似解决方案