从官网获取docker.io/nginx镜像之后,大家肯定都需要安装一些自己需要的东西,但是修改/etc/apt/sources.list数据为国内源的时候,apt update报错,源内容

# deb http://snapshot.debian.org/archive/debian/20200422T000000Z buster main
# deb http://deb.debian.org/debian buster main
deb https://mirrors.aliyun.com/debian buster main contrib non-free
# deb http://snapshot.debian.org/archive/debian-security/20200422T000000Z buster/updates main
# deb http://security.debian.org/debian-security buster/updates main
deb http://mirrors.ustc.edu.cn/debian-security buster/updates main
# deb http://snapshot.debian.org/archive/debian/20200422T000000Z buster-updates main
# deb http://deb.debian.org/debian buster-updates main
deb https://mirrors.aliyun.com/debian buster-updates main contrib non-free

看网上说是时钟不对,结果测试不正确,还得把sources.list改回去,安装ca-certificates再试

apt-get install -y ca-certificates

然后再修改源就OK了

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐