Skip to content

Commit dbbbf3b

Browse files
committed
Switched the bullseye security repository to archive.debian.org
snapshot.debian.org returns 503 for every archive path, which broke the build. archive.debian.org now hosts bullseye-security with the same final package versions, and its Release file has no Valid-Until, so the check-valid-until override is no longer needed.
1 parent f03d4ce commit dbbbf3b

4 files changed

Lines changed: 13 additions & 34 deletions

File tree

‎Dockerfile.tmpl‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ ARG PHP_REDIS_VERSION=6.3.0
2929
# Latest version of amqp-extension: https://pecl.php.net/package/amqp
3030
ARG PHP_AMQP_VERSION=2.2.0
3131

32-
ARG DEBIAN_SECURITY_SNAPSHOT=20260901T000000Z
33-
3432
WORKDIR /var/www
3533

3634
RUN --mount=type=bind,from=php_extension_installer,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \
3735
# Bullseye is EOL:
38-
sed -i -E "s|^deb http://deb.debian.org/debian-security (.*)|deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/$DEBIAN_SECURITY_SNAPSHOT \1|" /etc/apt/sources.list \
39-
&& grep -q snapshot.debian.org /etc/apt/sources.list \
36+
sed -i -E "s|^deb http://deb.debian.org/debian-security (.*)|deb http://archive.debian.org/debian-security \1|" /etc/apt/sources.list \
37+
&& grep -q archive.debian.org /etc/apt/sources.list \
4038
&& apt-get update \
4139
&& apt-get install --assume-yes --no-install-recommends \
4240
apt-transport-https \

‎README.md‎

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,16 @@ Building `builder`-target:
4545
docker build --tag ghcr.io/specsnl/php74/builder:latest --file fpm/Dockerfile --target builder .
4646
```
4747

48-
## Debian bullseye is EOL (`DEBIAN_SECURITY_SNAPSHOT`)
48+
## Debian bullseye is EOL
4949

5050
PHP 7.4 images are only published for Debian 11 (bullseye), which is past end-of-life. Its security
51-
suite has stopped being maintained, and the mirrors have moved on in a way that breaks `apt-get`:
51+
suite has stopped being maintained, and `deb.debian.org` still serves the `bullseye-security` package
52+
index while the `.deb` pool behind it has been purged — every package download returns a 404.
5253

53-
- `deb.debian.org` still serves the `bullseye-security` package index, but the `.deb` pool behind it
54-
has been purged — every package download returns a 404.
55-
- `archive.debian.org`, where EOL suites normally end up, does not have `bullseye-security` yet. As
56-
of this writing it only goes up to `buster`.
57-
- The final `Release` file (published 2026-08-31) carries a 7-day `Valid-Until` that has long since
58-
lapsed, so `apt` rejects the repository as expired even where it is reachable.
59-
60-
To still get the last published security updates, the runtime stage rewrites the `bullseye-security`
61-
entry in `/etc/apt/sources.list` to point at [snapshot.debian.org](https://snapshot.debian.org),
62-
which keeps every historical mirror state permanently. The build arg pins which state is used:
63-
64-
```
65-
ARG DEBIAN_SECURITY_SNAPSHOT=20260901T000000Z
66-
```
67-
68-
That timestamp sits just after the final security publish, so the image gets the complete, final set
69-
of bullseye security updates. Because the snapshot is immutable, this does not break when Debian
70-
finishes moving bullseye to `archive.debian.org`. The rewrite also disables `apt`'s freshness check
71-
for that one repository — signatures are still verified, only the "is this recent?" assertion is
72-
skipped, which is unavoidable for a deliberately frozen suite.
54+
To still get the final published security updates, the runtime stage rewrites the `bullseye-security`
55+
entry in `/etc/apt/sources.list` to point at `archive.debian.org`, where Debian keeps EOL suites
56+
permanently. The archived `Release` file carries no `Valid-Until`, so no `apt` freshness override is
57+
needed.
7358

7459
A `grep` guard follows the rewrite so the build fails loudly if the base image ever changes its
7560
`sources.list` format, rather than silently falling back to building without security updates.

‎apache/Dockerfile‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ ARG PHP_REDIS_VERSION=6.3.0
2929
# Latest version of amqp-extension: https://pecl.php.net/package/amqp
3030
ARG PHP_AMQP_VERSION=2.2.0
3131

32-
ARG DEBIAN_SECURITY_SNAPSHOT=20260901T000000Z
33-
3432
WORKDIR /var/www
3533

3634
RUN --mount=type=bind,from=php_extension_installer,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \
3735
# Bullseye is EOL:
38-
sed -i -E "s|^deb http://deb.debian.org/debian-security (.*)|deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/$DEBIAN_SECURITY_SNAPSHOT \1|" /etc/apt/sources.list \
39-
&& grep -q snapshot.debian.org /etc/apt/sources.list \
36+
sed -i -E "s|^deb http://deb.debian.org/debian-security (.*)|deb http://archive.debian.org/debian-security \1|" /etc/apt/sources.list \
37+
&& grep -q archive.debian.org /etc/apt/sources.list \
4038
&& apt-get update \
4139
&& apt-get install --assume-yes --no-install-recommends \
4240
apt-transport-https \

‎fpm/Dockerfile‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ ARG PHP_REDIS_VERSION=6.3.0
2929
# Latest version of amqp-extension: https://pecl.php.net/package/amqp
3030
ARG PHP_AMQP_VERSION=2.2.0
3131

32-
ARG DEBIAN_SECURITY_SNAPSHOT=20260901T000000Z
33-
3432
WORKDIR /var/www
3533

3634
RUN --mount=type=bind,from=php_extension_installer,source=/usr/bin/install-php-extensions,target=/usr/local/bin/install-php-extensions \
3735
# Bullseye is EOL:
38-
sed -i -E "s|^deb http://deb.debian.org/debian-security (.*)|deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/$DEBIAN_SECURITY_SNAPSHOT \1|" /etc/apt/sources.list \
39-
&& grep -q snapshot.debian.org /etc/apt/sources.list \
36+
sed -i -E "s|^deb http://deb.debian.org/debian-security (.*)|deb http://archive.debian.org/debian-security \1|" /etc/apt/sources.list \
37+
&& grep -q archive.debian.org /etc/apt/sources.list \
4038
&& apt-get update \
4139
&& apt-get install --assume-yes --no-install-recommends \
4240
apt-transport-https \

0 commit comments

Comments
 (0)