Docker 笔记2之centos7安装Docker
Install Docker on Centos7
yum install -y yum-utils device-mapper-persistent-data lvm2
- 添加 docker-ce 源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
- 替换加速镜像(可选)
sed -i 's+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
- 安装
yum install docker-ce
- 设置开机启动并启动
systemctl enable docker
systemctl start docker
- 测试hello-world
docker info
docker run hello-world