Centos7安装docker

详细文档:https://docs.docker.com/install/linux/docker-ce/centos/

1.清理工作

yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine

2.设置安装源
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

3.安装docker-ce
yum install docker-ce docker-ce-cli containerd.io

4.启动服务
systemctl start docker

5.测试
docker run hello-world

点赞

发表评论