Debian "stretch" was removed then image ruby 2.5.3 apt get error 404 while updating
- Issue while building docker image with
ruby:2.5.3:
W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages 404 Not Found
- Root cause:
stretchwas removed from http://security.debian.org/debian-security/dists/ - Workaround:
Touch
etc/apt/archive_sources.list
deb http://archive.debian.org/debian stretch main
deb http://archive.debian.org/debian-archive/debian-security stretch/updates main
Then:
FROM ruby:2.5.3 AS builder
COPY etc/apt/archive_sources.list /etc/apt/sources.list
https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html
Note này hắn lấy từ GitHub issue qua.