我正在尝试在企业代理后面的私有托管 Azure DevOps 代理上构建 dockerfile。基础镜像是 python/3.8.3-slim-buster。当我运行 apt-get update 时,出现以下错误:
Err:1 http://deb.debian.org/debian buster InRelease
470 status code 470 [IP: 151.101.36.204 80]
Err:2 http://security.debian.org/debian-security buster/updates InRelease
470 status code 470 [IP: 151.101.36.204 80]
Err:3 http://deb.debian.org/debian buster-updates InRelease
470 status code 470 [IP: 151.101.36.204 80]
Reading package lists...
E: The repository 'http://deb.debian.org/debian buster InRelease' is not signed.
E: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease 470 status code 470 [IP: 151.101.36.204 80]
E: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease 470 status code 470 [IP: 151.101.36.204 80]
E: The repository 'http://security.debian.org/debian-security buster/updates InRelease' is not signed.
E: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease 470 status code 470 [IP: 151.101.36.204 80]
E: The repository 'http://deb.debian.org/debian buster-updates InRelease' is not signed.
现在棘手的部分是,如果我手动登录到这个代理,并在那里给 docker build 命令它工作正常。在 Microsoft 托管代理上构建也可以正常工作。
我将带有 --build-arg 标志的代理配置传递给 Dockerfile。
有人知道错误可能在哪里吗?
编辑:我尝试添加“--allow-releaseinfo-change”标志,仍然是同样的错误。我觉得它与代理有关,但不知道从哪里开始寻找。