From 3955fa18f7bef2b8260ada1abf10cca43cf35b6a Mon Sep 17 00:00:00 2001 From: Jesper Noordsij Date: Mon, 27 Apr 2026 14:57:05 +0200 Subject: [PATCH 1/4] Drop extensions --- latest/Dockerfile | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/latest/Dockerfile b/latest/Dockerfile index 9f6d207..8d0c8ad 100644 --- a/latest/Dockerfile +++ b/latest/Dockerfile @@ -25,22 +25,6 @@ ENV COMPOSER_HOME=/tmp ENV COMPOSER_VERSION=2.9.7 RUN set -eux ; \ - # install https://github.com/mlocati/docker-php-extension-installer - curl \ - --silent \ - --fail \ - --location \ - --retry 3 \ - --output /usr/local/bin/install-php-extensions \ - --url https://github.com/mlocati/docker-php-extension-installer/releases/download/1.2.58/install-php-extensions \ - ; \ - echo 182011b3dca5544a70fdeb587af44ed1760aa9a2ed37d787d0f280a99f92b008e638c37762360cd85583830a097665547849cb2293c4a0ee32c2a36ef7a349e2 /usr/local/bin/install-php-extensions | sha512sum --strict --check ; \ - chmod +x /usr/local/bin/install-php-extensions ; \ - # install necessary/useful extensions not included in base image - install-php-extensions \ - bz2 \ - zip \ - ; \ # install public keys for snapshot and tag validation, see https://composer.github.io/pubkeys.html curl \ --silent \ From 603b246d598bb1e694c7bf7e37e0ce9c658e753e Mon Sep 17 00:00:00 2001 From: Jesper Noordsij Date: Mon, 27 Apr 2026 14:57:21 +0200 Subject: [PATCH 2/4] Drop packages --- latest/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/latest/Dockerfile b/latest/Dockerfile index 8d0c8ad..73776c8 100644 --- a/latest/Dockerfile +++ b/latest/Dockerfile @@ -2,14 +2,11 @@ FROM php:8-alpine AS binary-with-runtime RUN set -eux ; \ apk add --no-cache --virtual .composer-rundeps \ - 7zip \ bash \ coreutils \ git \ - make \ mercurial \ openssh-client \ - patch \ subversion \ tini \ unzip \ From 5094c30d075896be25b174115466cdbb857a0752 Mon Sep 17 00:00:00 2001 From: Jesper Noordsij Date: Mon, 27 Apr 2026 14:57:48 +0200 Subject: [PATCH 3/4] Make coreutils buildtime only --- latest/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/latest/Dockerfile b/latest/Dockerfile index 73776c8..ac3cf41 100644 --- a/latest/Dockerfile +++ b/latest/Dockerfile @@ -3,7 +3,6 @@ FROM php:8-alpine AS binary-with-runtime RUN set -eux ; \ apk add --no-cache --virtual .composer-rundeps \ bash \ - coreutils \ git \ mercurial \ openssh-client \ @@ -22,6 +21,9 @@ ENV COMPOSER_HOME=/tmp ENV COMPOSER_VERSION=2.9.7 RUN set -eux ; \ + apk add --no-cache --virtual .composer-builddeps \ + coreutils \ + ; \ # install public keys for snapshot and tag validation, see https://composer.github.io/pubkeys.html curl \ --silent \ @@ -60,6 +62,7 @@ RUN set -eux ; \ ; \ composer --ansi --version --no-interaction ; \ rm -f /tmp/installer.php ; \ + apk del .composer-builddeps ; \ find /tmp -type d -exec chmod -v 1777 {} + COPY docker-entrypoint.sh /docker-entrypoint.sh From 608b97929a289c4211ec8ebec534bfaa63ed3ed0 Mon Sep 17 00:00:00 2001 From: Jesper Noordsij Date: Mon, 27 Apr 2026 15:03:56 +0200 Subject: [PATCH 4/4] Add reference --- latest/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/latest/Dockerfile b/latest/Dockerfile index ac3cf41..03b2f5c 100644 --- a/latest/Dockerfile +++ b/latest/Dockerfile @@ -1,5 +1,6 @@ FROM php:8-alpine AS binary-with-runtime +# https://github.com/composer/composer/blob/main/README.md#binary-dependencies RUN set -eux ; \ apk add --no-cache --virtual .composer-rundeps \ bash \