docker centos7 安装

https://docs.docker.com/install/linux/docker-ce/centos/

 

https://developer.aliyun.com/article/709887

 

 


1.

yum -y install gcc
yum -y install gcc-c++

 

2. 删除旧的

$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

3.

$ sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

4.设置 镜像

 
sudo yum-config-manager \
--add-repo \
https://mydream.ink/utils/container/docker-ce.repo
 

5.更新yum

yum makecache fast

6.安装 docker ce

yum -y install docker-ce

7. 启动 docker

systemctl start docker

8.查看 docker 版本

 

docker version

配置镜像加速

 

 

 

mkdir -p /etc/docker
vim /etc/docker/daemon.json
#网易云
{"registry-mirrors":["http://hub-mirror.c.163.com"]} 


#阿里云
{"registry-mirrors":["https://{自己编码}.mirror.aliyuncs.com"]}

重新加载

systemctl daemon-reload
systemctl restart docker

 

 

 

安装完成


 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
posted @ 2020-01-15 15:51  AngDH  阅读(191)  评论(0编辑  收藏  举报