Docker实践

来自iCenter Wiki
跳转至: 导航搜索
目标学习docker
环境--虚拟机10.0.1.25 (云)yum makecache
Fedora/CentOS/RHEL
新建 /etc/yum.repos.d/docker.repo,内容为

Fedora/CentOS/RHEL版本:

[dockerrepo]
name=Docker Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/docker/yum/repo/centos7
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/docker/yum/gpg

再执行

sudo yum makecache
sudo yum install docker-engine

安装报错:Transaction check error:
大意是版本冲突
运行命令:yum install libdevmapper* -y

然后再运行 :yum install docker-engine OK

启动服务Enable the service.
 sudo systemctl enable docker.service

 sudo systemctl start docker
 docker run hello-world