Dokcer容器内执行aptgetupdate慢的问题

编程

1. 查看镜像debian版本:

    cat /etc/debian_version

2:清空/etc/apt/sources.list文件

    echo > /etc/apt/sources.list

3:查看/etc/apt/sources.list内容

    cat /etc/apt/sources.list

4:向/etc/apt/sources.list文件写入阿里云镜像地址,具体地址查看阿里云镜像站,根据debian版本确定镜像地址

cat >> /etc/apt/sources.list <<EOF
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
EOF

以上是 Dokcer容器内执行aptgetupdate慢的问题 的全部内容, 来源链接: utcz.com/z/516116.html

回到顶部