Dockerfile - debian Jessie 404: パッケージが見つかりません。

Dockerfile - debian Jessie 404: パッケージが見つかりません。

Debian 9.8でDockerコンテナを設定しようとしていますが、実行中に次のエラーが発生し続けますdocker-compose up -d

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

これによりプロセスが短縮されます。

2つの呼び出しを含む次のDockerfile(読みやすくするために短縮されています)があり、提案したapt-get updateように修正しました。~から これら ページ無駄:

FROM python:3.5.2
RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list
RUN apt-get update

RUN apt-get install -y git 
[...]
RUN apt-get install -y xvfb
RUN pip install algoliasearch==1.12.0
[...]
RUN pip install gunicorn

RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN sed -i '/jessie-updates/d' /etc/apt/sources.list
RUN apt-get update

RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
[...]
RUN export PATH="$(pwd)":$PATH
WORKDIR /usr/src/api
CMD sh -c "gunicorn sourcingplatform.wsgi:application --bind 0.0.0.0:80"

また、で見つけることができるjessieへの参照もすべて削除しました/etc/apt/sources/list。私は何を見逃していますか?

ベストアンサー1

ここでは、最初の行が一致しないようで、まだ次のようになりますjessie-updates

RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update

sedすでに持っているより一般的なコマンドを使用してください。

RUN sed -i '/jessie-updates/d' /etc/apt/sources.list
RUN apt-get -o Acquire::Check-Valid-Until=false update

おすすめ記事