Docker——Centos8.2安裝Docker


前言

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參數,讓他自己選擇相應的包即可

  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!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM