wget https://mirrors.ustc.edu.cn/repogen/conf/debian-http-4-stretch -O sources.list
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
sed -i ‘s/download.docker.com/mirrors.ustc.edu.cn\/docker-ce/g‘ /etc/apt/sources.list
mkdir –p /etc/docker
cat > /etc/docker/daemon.json <<EOF
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn/"]
}
EOF
apt-get install docker-ce
原文地址:https://www.cnblogs.com/feinian/p/9902414.html
时间: 2024-11-07 22:36:30