Skip to content

Commit e3d0dca

Browse files
authored
Fix autofix Docker build on GitHub runners (#1980)
The `autofix` job fails on every PR and on master because apt cannot install packages in the bullseye images. Debian 11 reached end of life on 2026-08-31, and its packages are moving from deb.debian.org to archive.debian.org. The php-cs-fixer image now installs `git` and `unzip` from archive.debian.org when the base image is bullseye. <details> <summary>deb.debian.org still serves the bullseye package lists, but not the security packages</summary> `apt-get update` succeeds, then `apt-get install` fails with `404 Not Found` for packages in `bullseye-security`. archive.debian.org serves `bullseye` main, but not `bullseye-security` yet. Last passing run: https://github.com/webonyx/graphql-php/actions/runs/33423045262. First failing run: https://github.com/webonyx/graphql-php/actions/runs/34238445855. Log with the 404s: https://github.com/webonyx/graphql-php/actions/runs/36310173564. </details> <details> <summary>Installing the dependencies in the composer image would avoid apt, but is a bigger change</summary> `composer require` could run in the `composer` stage, which already has `git` and `unzip`, with `platform.php` set to the target PHP version. That needs a PHP version build argument in the Makefile. For a throwaway formatter image, frozen packages without security updates are acceptable. </details> 🤖 Generated with Claude Code
1 parent c267619 commit e3d0dca

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.php-cs-fixer.dockerfile‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
ARG IMAGE
22
FROM ${IMAGE}
33

4-
RUN apt-get update \
4+
# Debian 11 reached end of life and moved to archive.debian.org
5+
RUN if grep -q VERSION_CODENAME=bullseye /etc/os-release; then \
6+
echo "deb http://archive.debian.org/debian bullseye main" > /etc/apt/sources.list; \
7+
fi \
8+
&& apt-get update \
59
&& apt-get install --yes --no-install-recommends \
610
git \
711
unzip \

0 commit comments

Comments
 (0)