centos7安装docker
一、参考文献
docker 安装:
参考官网: https://docs.docker.com/engine/install/centos/
二、安装:docker
1.卸载之前安装的docker
$ sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
2.安装存储库
$ sudo yum install -y yum-utils
$ sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
3.安装docker
$ sudo yum install docker-ce docker-ce-cli containerd.io
4.开启Docker服务
$ sudo systemctl start docker
5.查看docker是否安装成功
$ sudo docker -v
$ sudo docker images
6.设置docker安装自启动
$ sudo systemctl enable docker
7.设置阿里云镜像加速:
容器镜像服务->容器镜像加速器