docker-ce

查看版本

https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/7/x86_64/stable/Packages/

在https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/中把docker-cd.repo地址wget到yum.repo目录下

cd /etc/yum.repos.d

wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo

替换https://download.docker.com成https://mirrors.tuna.tsinghua.edu.cn/docker-ce

vim docker-ce.repo

 

:%s@https://download.docker.com@https://mirrors.tuna.tsinghua.edu.cn/docker-ce@

yum install -y docker-ce

mkdir /etc/docker

vim /etc/docker/daemon.json

-------------------------加速器------------------------------------

cat >  /etc/docker/daemon.json << EOF

{
"registry-mirrors":["https://evup1r6o.mirror.aliyuncs.com"]

"live-restore": true,                (重启自动启动)
}

EOF
----------------------------------------------------------------------

systemctl restart docker

systemctl enable docker 

查看版本

docker version

查看纤细信息

docker info

举例安装镜像

 docker image pull nginx:1.14-alpine 

 

posted @ 2019-12-25 13:41  Le1543  阅读(343)  评论(0编辑  收藏  举报