yum安裝最新版docker


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.


免責聲明!

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



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