APT should probably use HTTPS for getting packages
AdamLeyshon opened this issue · 1 comments
AdamLeyshon commented
As of recent, it seems Fastly CDN which powers Debian's APT repos, no longer serves HTTP requests.
They also have not redirected HTTP to HTTPS either, though even if they did I'm not sure APT would follow it.
When using FROM rust:1.68.2-slim-bullseye
#0 0.437 Ign:1 http://deb.debian.org/debian bullseye InRelease
#0 0.438 Ign:2 http://deb.debian.org/debian-security bullseye-security InRelease
#0 0.439 Ign:3 http://deb.debian.org/debian bullseye-updates InRelease
#0 0.439 Err:4 http://deb.debian.org/debian bullseye Release
#0 0.439 404 Not Found [IP: 146.75.34.132 80]
#0 0.440 Err:5 http://deb.debian.org/debian-security bullseye-security Release
#0 0.440 404 Not Found [IP: 146.75.34.132 80]
#0 0.440 Err:6 http://deb.debian.org/debian bullseye-updates Release
#0 0.440 404 Not Found [IP: 146.75.34.132 80]
#0 0.441 Reading package lists...
#0 0.445 E: The repository 'http://deb.debian.org/debian bullseye Release' does not have a Release file.
#0 0.445 E: The repository 'http://deb.debian.org/debian-security bullseye-security Release' does not have a Release file.
#0 0.445 E: The repository 'http://deb.debian.org/debian bullseye-updates Release' does not have a Release file.
But a simple sed
fixes this:
RUN sed -i 's|http://|https://|g' /etc/apt/sources.list
Step 3/17 : RUN sed -i 's|http://|https://|g' /etc/apt/sources.list
---> Running in 1caf603709f4
Removing intermediate container 1caf603709f4
---> e16419def7b0
Step 4/17 : RUN apt-get update && apt-get install --no-install-recommends -y build-essential protobuf-compiler librdkafka-dev libprotobuf-dev libssl-dev libpq-dev pkg-config && rm -rf /var/lib/apt/lists/*
---> Running in d246af208e0c
Get:1 https://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 https://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 https://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 https://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:5 https://deb.debian.org/debian-security bullseye-security/main amd64 Packages [237 kB]
Get:6 https://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.6 kB]
Fetched 8643 kB in 1s (8992 kB/s)
Reading package lists...
Reading package lists...
Please let me know if I can provide more information.
sfackler commented
You should make this request to the maintainers of the Debian base image we build off of.