CentOS 7 Docker安装教程
docker安装官方文档:Install Docker Engine on CentOS
1、更新 yum
yum update -y
2、安装yum-utils
yum-utils
提供了yum-config-manager
工具
sudo yum install -y yum-utils
3、通过yum-config-manager
添加docker repository
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
由于网络原因这一步可能会失败,提示
Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.repos.d/docker-ce.repo: [Errno 14] curl#35 - "TCP connection reset by peer
如果出现上面的错误提示,可通阿里源进行添加
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-