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