企業プロキシの背後にあるプライベートホストのAzureDevOpsエージェントで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.
ここで注意が必要なのは、このエージェントに手動でログインし、そこでdockerbuildコマンドを実行すると正常に機能することです。また、Microsoftがホストするエージェント上に構築することも問題なく機能します。
--build-argフラグを指定したプロキシ構成をDockerfileに渡します。
エラーがどこにあるのか誰か考えていますか?
編集:「-allow-releaseinfo-change」フラグを追加しようとしましたが、それでも同じエラーです。どういうわけかプロキシ関連だと感じていますが、どこから探し始めればいいのかわかりません。
今日、私の環境変数HTTP_PROXYとHTTPS_PROXYが取得されなかったため、apt-getがプロキシ構成を別の場所に保持することを学びました。
proxy.confを作成し、それをコンテナーにコピーすると、https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-the-proxy-for-apt-で説明した問題が解決しました。 for-ubuntu-18-04 /
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加