大佬教程收集整理的这篇文章主要介绍了CentOS下docker ce的安装,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
官方链接在此:
https://docs.docker.com/ENGIne/installation/linux/docker-ce/centos/#install-docker-ce-1
首先找到已经安装的docker
yum list installed|grep docker卸载掉
yum -y remove docker-ENGIne.x86_64
yum remove docker \ docker-common \ docker-selinux \ docker-ENGIne
yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
上面两条命令一起执行
yum install -y yum-utils device-mapper-persistent-data lvm2 && yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
如果发现上面一句执行超时,可能是墙了,试下下面一句
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce配上加速器
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://d669dcee.m.daocloud.io
或者使用阿里的加速器修改/etc/docker/daemon.json为{ "registry-mirrors": ["https://7vm1yv9c.mirror.aliyuncs.com"]}
如果docker启动需要重启docker生效
systemctl daemon-reload && systemctl restart docker
把docker服务启动
systemctl start docker
以上是大佬教程为你收集整理的CentOS下docker ce的安装全部内容,希望文章能够帮你解决CentOS下docker ce的安装所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。