配置阿里云yum源:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
安装最新版本docker:
curl -fsSL https://get.docker.com/ | sh
docker文档:
centos安装docker: Install Docker Engine on CentOS | Docker Documentation
清华大学开源软件站:docker-ce | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
1,下载安装最新版本docker
yum install -y yum-utils
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io -y
安装指定版本
yum list docker-ce --showduplicates | sort -r
2,启动docker
systemctl enable docker
systemctl start docker
3,测试
docker run hello-world