0

The problem

I'm trying to use jessie-backports in a docker repository for a Ruby on Rails project using this Dockerfile:

FROM ruby:2.4.1
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

RUN echo 'alias ll="ls --color=auto -l"' >> ~/.bashrc
RUN apt-get remove -y python
RUN apt-get update --fix-missing
RUN apt-get -y upgrade

RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list && apt-get update
RUN apt-get install -y certbot -t jessie-backports

However when I attempted to build the docker image. the following error popped up in the middle of the installation:

E: Release file for http://archive.debian.org/debian/dists/jessie-backports/InRelease is expired (invalid since 77d 3h 49min 17s). Updates for this repository will not be applied.

As of March 27 Lucas Nussbaum wrote in this blogpost that jessie-updates and jessie-backports were going to be removed from Debian mirrors. The blog post I mentioned stated that what I needed to do was replace:

deb http://ftp.debian.org/debian jessie-backports main

With this other commands:

deb http://archive.debian.org/debian/ jessie-backports main contrib non-free
echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until

So I changed the commands as follows:

FROM ruby:2.4.1
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

RUN echo 'alias ll="ls --color=auto -l"' >> ~/.bashrc
RUN apt-get remove -y python
RUN apt-get update --fix-missing
RUN apt-get -y upgrade

RUN echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" > /etc/apt/sources.list
RUN echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until
RUN apt-get update
RUN apt-get install -y certbot -t jessie-backports

However the same issue is still present.

I also attempted to move the commands before any apt command like this:

FROM ruby:2.4.1
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

RUN echo 'alias ll="ls --color=auto -l"' >> ~/.bashrc

RUN echo "deb http://archive.debian.org/debian/ jessie-backports main contrib non-free" > /etc/apt/sources.list
RUN echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until
RUN apt-get update

RUN apt-get remove -y python
RUN apt-get update --fix-missing
RUN apt-get -y upgrade
RUN apt-get install -y certbot -t jessie-backports
2
  • 2
    See this answer from Stephen Kitt.
    – Freddy
    May 8 '19 at 17:32
  • What error do you get with the last variant? It works for me, as-is (although I’d change the jessie-backports line to use >> instead of >). May 9 '19 at 11:58
0

To solve the issue I needed to pull all of the Debian main repository, for certbot to be installed correctly.

FROM ruby:2.4.1
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

RUN echo 'alias ll="ls --color=auto -l"' >> ~/.bashrc

RUN echo "deb http://ftp.debian.org/debian jessie main" > /etc/apt/sources.list
RUN apt-get update

RUN apt-get remove -y python
RUN apt-get update --fix-missing
RUN apt-get -y upgrade

# Let's Encrypt (SSL CERTIFICATES)
RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian/ jessie-backports main" >> /etc/apt/sources.list
RUN echo 'Acquire::Check-Valid-Until no;' >> /etc/apt/apt.conf.d/99no-check-valid-until
RUN apt-get update
RUN apt-get install -y certbot -t jessie-backports

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.