1

I'm trying to set up a docker container on Debian 9.8, but I keep getting the following error when I run docker-compose up -d:

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

Which then causes the process to be cut short.

I have the following Dockerfile (shortened for readability) with 2 calls to apt-get update that I have modified with suggestions from these pages to no avail:

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"

I also removed any references I could find to jessie in /etc/apt/sources/list. What am I missing?

  • For reference, multi-post is at https://stackoverflow.com/q/55513442/2344631 – Chris Davies Apr 05 '19 at 09:05
  • 2
    Hi Jessica. Cross-posted questions are closed on this site. It might make sense delete the [so] version (I see it's actually been nominated for closure as Off Topic) – even though it already has a helpful answer. – Anthony Geoghegan Apr 05 '19 at 09:33

1 Answers1

3

I suspect the first line here doesn’t match, so you’re still trying to fetch 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

Use the more general sed command you already have:

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