美文网首页
Centos7 安装docker

Centos7 安装docker

作者: GaryChiu被注册 | 来源:发表于2019-05-08 18:33 被阅读0次
1.配置yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum clean all
yum makecache
2.安装依赖包
yum install -y yum-utils device-mapper-persistent-data lvm2
3.安装docker
yum install -y docker-ce docker-ce-cli containerd.io
4.开启docker服务
systemctl start docker
5.验证docker运行情况

*在本地没有相应名称镜像的情况下,会自动向docker hub拉取

docker run hello-world
6.配置docker镜像加速器
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io

相关文章

网友评论

      本文标题:Centos7 安装docker

      本文链接:https://www.haomeiwen.com/subject/ptinwqtx.html