推荐inux安装:
一.安装Docker
#安装依赖包:
yum install -y yum-utils device-mapper-persistent-data lvm2
#添加docker软件包源
yum-config-manager\
--add-repo\
http://download.docker.com/linux/centos/docker-ce.repo
#更新yum包索引
Yum makecache fast
#安装docker CE
Yum install docker-ce
#启动
Systemctl start docker
#卸载
yum remove docker-ce
rm -rf /var/lib/docker
官方安装文档:
https://docs.docker.com/engine/installation/linux/docker-ce/centos/#docker-ee-customers
公共镜像库:https://hub.docker.com/explore
二、配置国内镜像仓库
1.vim /etc/docker/daemon.json
{
"registry-mirrors":["https://6kx4zyno.mirror.aliyuncs.com"]
} ###阿里云镜像
2.重启docker: systemctl restart docker
3.查看: ps -ef |grep docker
4.查看镜像: docker images
来源:51CTO
作者:琉璃溅泪
链接:https://blog.51cto.com/12584051/2474357