概要
過去に docker build に成功した Dockerfile (Debian 9) において、
apt-get update を追加し実行すると、次のエラーが発生した
このときの原因と対策の記録である.
当然、人によって原因は異なるので注意が必要である.
エラーログ
Err:1 http://deb.debian.org/debian stretch/main amd64 python3-minimal amd64 3.5.3-1
Could not connect to debian.map.fastlydns.net:80 (151.101.74.132) 略
原因
下記 /etc/apt/sources.list に定義された URL から、
stretch (Debian 9) のパッケージリストが存在しなくなったため
# cat /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch-updates main
対策
ミラーサイト「http://ftp.jp.debian.org
」を参照するように変更した
$ cat /etc/apt/sources.list
deb http://ftp.jp.debian.org/debian/ stretch main contrib non-free
deb http://ftp.jp.debian.org/debian/ stretch-proposed-updates main contrib non-free
deb http://ftp.jp.debian.org/debian/ stretch-updates main contrib
deb http://ftp.jp.debian.org/debian/ stretch-backports main contrib non-free
その他
事前に、Proxy サーバを使用する設定が正しいことは確認した.
関連記事