黄局长 发表于 2023-11-10 16:25 给个网站教程看看 一、CentOS 7使用阿里源实现Docker安装 官方库的Repo可能出现不能拉Docker镜像的BUG(404)所以这里我用阿里源 yum remove -y docker docker-common docker-selinux docker-engine yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum list docker-ce --showduplicates | sort -r yum -y install docker-ce systemctl start docker systemctl enable docker 1.1 Debian使用阿里源实现Docker安装 apt install apt-transport-https ca-certificates curl software-properties-common -y curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg | apt-key add - add-apt-repository "deb [arch=amd64 trusted=yes] https://mirrors.aliyun.com/docker-ce/linux/debian $(lsb_release -cs) stable" #或者 直接 echo "deb [arch=amd64 trusted=yes] https://mirrors.aliyun.com/docker-ce/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list apt update -y apt install docker-ce -y systemctl start docker systemctl enable docker 1.2 Ubuntu 22使用阿里源实现Docker安装 apt update -y apt install -y apt-transport-https ca-certificates curl software-properties-common add-apt-repository "deb [arch=amd64 trusted=yes] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" #或者 直接 echo "deb [arch=amd64 trusted=yes] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list apt update -y apt install docker-ce -y systemctl start docker systemctl enable docker
wget -qO- https://get.docker.com/ | bash 其实用它这个自动脚本,多来几遍怎么都能装上。不行就配置个shell代理: export https_proxy="socks5://127.0.0.1:1080" export http_proxy="socks5://127.0.0.1:1080" 然后再用他的脚本装