Open chainsawriot opened 1 year ago
adding a line in the dockerfile / apptainer def before any calls to apt/apt-get
:
echo "deb http://archive.debian.org/debian stretch main contrib non-free" > /etc/apt/sources.list
seems to fix this. This solution is based on: https://unix.stackexchange.com/questions/371890/debian-the-repository-does-not-have-a-release-file
I will do some more testing and submit a pull request in the coming weeks.
I don't know if there's a better fix, as I suppose these older Debian images are not going to be updated to use the new repositories.
Actually, this concerns not just stretch release, but many other older versions...
@e-kotov I did that also in this blog post.
EOL Debian is easier because we know which Debian was used. The issue is that we need to study every r-ver
Rocker Image to study which Debian version was used.
UPDATE: I have an idea of running a shell script to determine the Debian / Ubuntu version from /etc/apt/sources.list
INSIDE the container; run update; if update fails, patch /etc/apt/sources.list
automatically and run update again.
@chainsawriot does not seem like a huge problem, as the definitions are public (e.g. https://github.com/rocker-org/rocker-versioned/blob/master/r-ver/3.1.0.Dockerfile ), so it is possible to simply clone the repo, parse all Dockefiles and create a small database of r-ver version vs Debian version. Then use this during the script generation.
Alternatively, we could inject a simple bash script that detects Debian version at image build time and applies the relevant line to add to /etc/apt/sources.list
UPDATE: missed your update. So yes, essentially my alternative solution is somewhat similar to your updated suggestion. I think this is the best way to go.
Many old Rocker and EOL images use Debian Stretch, which has been EOL since June 2022. The grace period is also lapsed recently, therefore it is no longer usable.
This is the quick fix:
https://github.com/debuerreotype/docker-debian-eol-artifacts/issues/9