chore: remove vendored docker-php-* helper scripts, add them from the original repo

This commit is contained in:
le0m
2026-10-23 19:59:27 +02:00
parent 33873081e0
commit 4bf2c50da7
56 changed files with 384 additions and 1786 deletions
-1
View File
@@ -110,7 +110,6 @@ jobs:
context: ${{ steps.plan.outputs.eol-dir }}
build-contexts: |
patches=eol/patches
scripts=eol/scripts
push: ${{ env.PUSH }}
cache-write: ${{ env.CACHE_WRITE }}
+1 -1
View File
@@ -58,7 +58,7 @@ build-base:
exit 1; \
fi
@echo " =====> Building $(BASE_IMAGE)..."
docker image build --quiet --build-context patches=eol/patches --build-context scripts=eol/scripts -t $(BASE_IMAGE) $(EOL_DIR)
docker image build --quiet --build-context patches=eol/patches -t $(BASE_IMAGE) $(EOL_DIR)
test:
@echo -e "=====> Testing loaded extensions... \c"
+12 -9
View File
@@ -171,8 +171,9 @@ RUN set -xe; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/fab49d4cb1c61e4f74c2dffe06961408212f054c/5.6/stretch/apache
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -269,16 +270,18 @@ RUN set -eux; \
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/5.6 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/5.6 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/apache /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
# chialab: from eol/scripts.
COPY --from=scripts apache2-foreground /usr/local/bin/
# chialab: from the source commit.
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
+10 -7
View File
@@ -111,8 +111,9 @@ RUN set -xe; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/fab49d4cb1c61e4f74c2dffe06961408212f054c/5.6/stretch/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -209,11 +210,13 @@ RUN set -eux; \
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/5.6 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/5.6 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
+10 -7
View File
@@ -112,8 +112,9 @@ RUN set -xe; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/fab49d4cb1c61e4f74c2dffe06961408212f054c/5.6/stretch/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -210,11 +211,13 @@ RUN set -eux; \
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/5.6 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/5.6 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
+12 -9
View File
@@ -165,8 +165,9 @@ RUN set -xe; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/0e5c984e02d9027c25794bfb5002a2f9da26a7ec/7.0/stretch/apache
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -263,16 +264,18 @@ RUN set -eux; \
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/5.6 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/5.6 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/apache /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
# chialab: from eol/scripts.
COPY --from=scripts apache2-foreground /usr/local/bin/
# chialab: from the source commit.
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
+10 -7
View File
@@ -105,8 +105,9 @@ RUN set -xe; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/0e5c984e02d9027c25794bfb5002a2f9da26a7ec/7.0/stretch/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -203,11 +204,13 @@ RUN set -eux; \
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/5.6 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/5.6 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
+10 -7
View File
@@ -106,8 +106,9 @@ RUN set -xe; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/0e5c984e02d9027c25794bfb5002a2f9da26a7ec/7.0/stretch/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -204,11 +205,13 @@ RUN set -eux; \
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/5.6 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/5.6 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
+10 -7
View File
@@ -97,8 +97,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/2bf33a859340cf4932a7bce5ae7bc935fc778b9d/7.1/alpine3.10/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -185,11 +186,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.1 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
+12 -9
View File
@@ -169,8 +169,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/2bf33a859340cf4932a7bce5ae7bc935fc778b9d/7.1/buster/apache
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -271,11 +272,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.1 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/apache /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
@@ -285,8 +288,8 @@ ENTRYPOINT ["docker-php-entrypoint"]
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
# chialab: from eol/scripts.
COPY --from=scripts apache2-foreground /usr/local/bin/
# chialab: from the source commit.
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
+10 -7
View File
@@ -109,8 +109,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/2bf33a859340cf4932a7bce5ae7bc935fc778b9d/7.1/buster/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -211,11 +212,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.1 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
+10 -7
View File
@@ -98,8 +98,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/2bf33a859340cf4932a7bce5ae7bc935fc778b9d/7.1/alpine3.10/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -186,11 +187,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.1 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
+10 -7
View File
@@ -110,8 +110,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/2bf33a859340cf4932a7bce5ae7bc935fc778b9d/7.1/buster/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -212,11 +213,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/5.6 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.1 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# temporary "freetype-config" workaround for https://github.com/docker-library/php/issues/865 (https://bugs.php.net/bug.php?id=76324)
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
+10 -7
View File
@@ -89,8 +89,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/20ebff40bb865416f3767540df06ad1df384337d/7.2/alpine3.12/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -187,11 +188,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.2 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.2 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+12 -9
View File
@@ -162,8 +162,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/20ebff40bb865416f3767540df06ad1df384337d/7.2/buster/apache
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -274,11 +275,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.2 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.2 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/apache /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
@@ -290,8 +293,8 @@ ENTRYPOINT ["docker-php-entrypoint"]
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
# chialab: from eol/scripts.
COPY --from=scripts apache2-foreground /usr/local/bin/
# chialab: from the source commit.
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
+10 -7
View File
@@ -101,8 +101,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/20ebff40bb865416f3767540df06ad1df384337d/7.2/buster/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -213,11 +214,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.2 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.2 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -91,8 +91,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/20ebff40bb865416f3767540df06ad1df384337d/7.2/alpine3.12/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -189,11 +190,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.2 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.2 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -103,8 +103,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/20ebff40bb865416f3767540df06ad1df384337d/7.2/buster/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -215,11 +216,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.2 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.2 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -87,8 +87,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/35d0a696b273c31f41ae224f189c19e794df91ae/7.3/alpine3.15/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -202,11 +203,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.3 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+12 -9
View File
@@ -158,8 +158,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/35d0a696b273c31f41ae224f189c19e794df91ae/7.3/bullseye/apache
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -283,11 +284,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.3 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/apache /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
@@ -299,8 +302,8 @@ ENTRYPOINT ["docker-php-entrypoint"]
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
# chialab: from eol/scripts.
COPY --from=scripts apache2-foreground /usr/local/bin/
# chialab: from the source commit.
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
+10 -7
View File
@@ -100,8 +100,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/35d0a696b273c31f41ae224f189c19e794df91ae/7.3/bullseye/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -224,11 +225,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.3 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -87,8 +87,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/35d0a696b273c31f41ae224f189c19e794df91ae/7.3/alpine3.15/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -207,11 +208,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.3 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -100,8 +100,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/35d0a696b273c31f41ae224f189c19e794df91ae/7.3/bullseye/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -226,11 +227,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.3 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -87,8 +87,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/1361ba95d80570e3984f9de9f765948246191557/7.4/alpine3.16/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -207,11 +208,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+12 -9
View File
@@ -158,8 +158,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/1361ba95d80570e3984f9de9f765948246191557/7.4/bullseye/apache
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -287,11 +288,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/apache /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
@@ -300,8 +303,8 @@ ENTRYPOINT ["docker-php-entrypoint"]
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
# chialab: from eol/scripts.
COPY --from=scripts apache2-foreground /usr/local/bin/
# chialab: from the source commit.
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
+10 -7
View File
@@ -100,8 +100,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/1361ba95d80570e3984f9de9f765948246191557/7.4/bullseye/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -228,11 +229,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -87,8 +87,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/1361ba95d80570e3984f9de9f765948246191557/7.4/alpine3.16/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -212,11 +213,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -100,8 +100,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/1361ba95d80570e3984f9de9f765948246191557/7.4/bullseye/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -230,11 +231,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -87,8 +87,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/df4636cac888ec860ccbf0f200637b88a2fb22ab/8.0/alpine3.16/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -205,11 +206,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+12 -9
View File
@@ -158,8 +158,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/df4636cac888ec860ccbf0f200637b88a2fb22ab/8.0/bullseye/apache
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -287,11 +288,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/apache /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
@@ -300,8 +303,8 @@ ENTRYPOINT ["docker-php-entrypoint"]
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
# chialab: from eol/scripts.
COPY --from=scripts apache2-foreground /usr/local/bin/
# chialab: from the source commit.
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
+10 -7
View File
@@ -100,8 +100,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/df4636cac888ec860ccbf0f200637b88a2fb22ab/8.0/bullseye/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -228,11 +229,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -87,8 +87,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/df4636cac888ec860ccbf0f200637b88a2fb22ab/8.0/alpine3.16/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -210,11 +211,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -100,8 +100,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/df4636cac888ec860ccbf0f200637b88a2fb22ab/8.0/bullseye/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -230,11 +231,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/7.4 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# sodium was built as a shared module (so that it can be replaced later if so desired), so let's enable it too (https://github.com/docker-library/php/issues/598)
RUN docker-php-ext-enable sodium
+10 -7
View File
@@ -84,8 +84,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/5c037abaf9dc0095e29807c048d9d1b97e6a9716/8.1/alpine3.21/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -226,11 +227,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/8.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# enable OPcache by default (https://wiki.php.net/rfc/make_opcache_required)
RUN docker-php-ext-enable opcache
+12 -9
View File
@@ -153,8 +153,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/5c037abaf9dc0095e29807c048d9d1b97e6a9716/8.1/trixie/apache
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -287,11 +288,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/8.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/apache /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# enable OPcache by default (https://wiki.php.net/rfc/make_opcache_required)
RUN docker-php-ext-enable opcache
@@ -303,8 +306,8 @@ ENTRYPOINT ["docker-php-entrypoint"]
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
# chialab: from eol/scripts.
COPY --from=scripts apache2-foreground /usr/local/bin/
# chialab: from the source commit.
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
+10 -7
View File
@@ -93,8 +93,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/5c037abaf9dc0095e29807c048d9d1b97e6a9716/8.1/trixie/cli
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -226,11 +227,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/8.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/cli /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# enable OPcache by default (https://wiki.php.net/rfc/make_opcache_required)
RUN docker-php-ext-enable opcache
+10 -7
View File
@@ -84,8 +84,9 @@ RUN set -eux; \
\
apk del --no-network .fetch-deps
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/5c037abaf9dc0095e29807c048d9d1b97e6a9716/8.1/alpine3.21/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -231,11 +232,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/8.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# enable OPcache by default (https://wiki.php.net/rfc/make_opcache_required)
RUN docker-php-ext-enable opcache
+10 -7
View File
@@ -93,8 +93,9 @@ RUN set -eux; \
apt-mark manual $savedAptMark > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
# chialab: helper scripts are shared by all eol/ images, see eol/scripts.
COPY --from=scripts docker-php-source /usr/local/bin/
# chialab: helper scripts are added from the source commit.
ARG DOCKER_PHP_SCRIPTS=https://raw.githubusercontent.com/docker-library/php/5c037abaf9dc0095e29807c048d9d1b97e6a9716/8.1/trixie/fpm
ADD --chmod=755 $DOCKER_PHP_SCRIPTS/docker-php-source /usr/local/bin/
# chialab: security backports for this EOL version (see eol/patches).
ENV PHP_PATCHES="CVE-2026-109618 CVE-2026-109619"
@@ -228,11 +229,13 @@ RUN set -eux; \
# smoke test
php --version
# chialab: from eol/scripts.
COPY --from=scripts docker-php-ext-configure/7.2 /usr/local/bin/docker-php-ext-configure
COPY --from=scripts docker-php-ext-enable/7.3 /usr/local/bin/docker-php-ext-enable
COPY --from=scripts docker-php-ext-install/8.1 /usr/local/bin/docker-php-ext-install
COPY --from=scripts docker-php-entrypoint/fpm /usr/local/bin/docker-php-entrypoint
# chialab: from the source commit.
ADD --chmod=755 \
$DOCKER_PHP_SCRIPTS/docker-php-ext-configure \
$DOCKER_PHP_SCRIPTS/docker-php-ext-enable \
$DOCKER_PHP_SCRIPTS/docker-php-ext-install \
$DOCKER_PHP_SCRIPTS/docker-php-entrypoint \
/usr/local/bin/
# enable OPcache by default (https://wiki.php.net/rfc/make_opcache_required)
RUN docker-php-ext-enable opcache
+7 -23
View File
@@ -6,8 +6,6 @@ applied to the sources, and use the result as the base image instead of `php:<ta
- `<X.Y>/<flavor>/Dockerfile`: the official Dockerfiles, one per tag suffix (`cli`, `apache`,
`fpm`, `alpine`, `fpm-alpine`).
- `scripts/`: the helper scripts copied into the images (`docker-php-*`, `apache2-foreground`),
passed to the build as the `scripts` named context.
- `patches/`: `docker-php-source-patch` and one `<X.Y>/series` of patches per version, passed to
the build as the `patches` named context.
@@ -25,11 +23,14 @@ Add it once there is a security patch to apply: `make test` fails an EOL image w
`<X.Y>/alpine<N>/{cli,fpm}` for `alpine` and `fpm-alpine`.
2. **Copy the Dockerfiles** to `eol/<X.Y>/<flavor>/Dockerfile`, with the header used by the
other versions linking the exact source path at that commit. Copy only the Dockerfile, not
the scripts next to it.
the scripts next to it: the build adds them from the same commit.
3. **Mark every change** with a `# chialab:` comment:
- replace the `COPY docker-php-*` and `COPY apache2-foreground` lines with
`COPY --from=scripts …` (see [Scripts](#scripts));
- add the patch step right after `docker-php-source` is copied, as in the other versions:
- set `ARG DOCKER_PHP_SCRIPTS` to the raw URL of the source path
(`https://raw.githubusercontent.com/docker-library/php/<commit>/<path>`) just before the
first `COPY`, and replace the `COPY docker-php-*` and `COPY apache2-foreground` lines with
`ADD --chmod=755 $DOCKER_PHP_SCRIPTS/<script> …`, one URL per script, as the other
versions do (`ADD` gives downloaded files mode 600);
- add the patch step right after `docker-php-source` is added, as in the other versions:
`ENV PHP_PATCHES`, `LABEL it.chialab.php.patches` and the `RUN` that bind-mounts
`patches/<X.Y>` and runs `docker-php-source-patch`;
- once the OS release is archived, or a download host or keyserver disappears, fix it the
@@ -38,20 +39,3 @@ Add it once there is a security patch to apply: `make test` fails an EOL image w
linking where each one comes from.
5. **Update the range** of EOL versions in the main [README](../README.md).
## Scripts
Each script in `scripts/` covers a range of PHP versions. Versioned scripts are named after the
first version that uses them, and serve every later version until the next file: for example,
`docker-php-ext-install/7.4` is used by both 7.4 and 8.0, and 8.1 has its own file.
Entrypoints vary by flavor rather than version, so they're named `cli` (also for `alpine`),
`fpm` (also for `fpm-alpine`) and `apache`.
When adding a version, compare each script from the docker-library directory with the newest
file in `scripts/`:
- if it's identical, point the new Dockerfile at that file;
- if it differs, add it as `scripts/<script>/<X.Y>` and point the new Dockerfile at it.
`docker-php-source` and `apache2-foreground` are the same for every version so far, so they
have no version directory. If a new version changes one of them, move it into one, like the
other scripts.
-40
View File
@@ -1,40 +0,0 @@
#!/bin/bash
set -e
# Note: we don't just use "apache2ctl" here because it itself is just a shell-script wrapper around apache2 which provides extra functionality like "apache2ctl start" for launching apache2 in the background.
# (also, when run as "apache2ctl <apache args>", it does not use "exec", which leaves an undesirable resident shell process)
: "${APACHE_CONFDIR:=/etc/apache2}"
: "${APACHE_ENVVARS:=$APACHE_CONFDIR/envvars}"
if test -f "$APACHE_ENVVARS"; then
. "$APACHE_ENVVARS"
fi
# Apache gets grumpy about PID files pre-existing
: "${APACHE_RUN_DIR:=/var/run/apache2}"
: "${APACHE_PID_FILE:=$APACHE_RUN_DIR/apache2.pid}"
rm -f "$APACHE_PID_FILE"
# create missing directories
# (especially APACHE_RUN_DIR, APACHE_LOCK_DIR, and APACHE_LOG_DIR)
for e in "${!APACHE_@}"; do
if [[ "$e" == *_DIR ]] && [[ "${!e}" == /* ]]; then
# handle "/var/lock" being a symlink to "/run/lock", but "/run/lock" not existing beforehand, so "/var/lock/something" fails to mkdir
# mkdir: cannot create directory '/var/lock': File exists
dir="${!e}"
while [ "$dir" != "$(dirname "$dir")" ]; do
dir="$(dirname "$dir")"
if [ -d "$dir" ]; then
break
fi
absDir="$(readlink -f "$dir" 2>/dev/null || :)"
if [ -n "$absDir" ]; then
mkdir -p "$absDir"
fi
done
mkdir -p "${!e}"
fi
done
exec apache2 -DFOREGROUND "$@"
-9
View File
@@ -1,9 +0,0 @@
#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- apache2-foreground "$@"
fi
exec "$@"
-9
View File
@@ -1,9 +0,0 @@
#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- php "$@"
fi
exec "$@"
-9
View File
@@ -1,9 +0,0 @@
#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- php-fpm "$@"
fi
exec "$@"
-69
View File
@@ -1,69 +0,0 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 ext-name [configure flags]"
echo " ie: $0 gd --with-jpeg-dir=/usr/local/something"
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
ext="$1"
if [ -z "$ext" ] || [ ! -d "$ext" ]; then
usage >&2
exit 1
fi
shift
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
fi
fi
if command -v dpkg-architecture > /dev/null; then
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"
set -- --build="$gnuArch" "$@"
fi
cd "$ext"
phpize
./configure "$@"
-69
View File
@@ -1,69 +0,0 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 ext-name [configure flags]"
echo " ie: $0 gd --with-jpeg-dir=/usr/local/something"
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
ext="$1"
if [ -z "$ext" ] || [ ! -d "$ext" ]; then
usage >&2
exit 1
fi
shift
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
fi
fi
if command -v dpkg-architecture > /dev/null; then
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"
set -- --build="$gnuArch" "$@"
fi
cd "$ext"
phpize
./configure --enable-option-checking=fatal "$@"
-114
View File
@@ -1,114 +0,0 @@
#!/bin/sh
set -e
extDir="$(php -r 'echo ini_get("extension_dir");')"
cd "$extDir"
usage() {
echo "usage: $0 [options] module-name [module-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 --ini-name 0-apc.ini apcu apc"
echo
echo 'Possible values for module-name:'
find -maxdepth 1 \
-type f \
-name '*.so' \
-exec basename '{}' ';' \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?' --long 'help,ini-name:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
modules=
for module; do
if [ -z "$module" ]; then
continue
fi
if [ -f "$module.so" ] && ! [ -f "$module" ]; then
# allow ".so" to be optional
module="$module.so"
fi
if ! [ -f "$module" ]; then
echo >&2 "error: '$module' does not exist"
echo >&2
usage >&2
exit 1
fi
modules="$modules $module"
done
if [ -z "$modules" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi
for module in $modules; do
if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
absModule="$(readlink -f "$module")"
line="zend_extension=$absModule"
else
line="extension=$module"
fi
ext="$(basename "$module")"
ext="${ext%.*}"
if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then
# this isn't perfect, but it's better than nothing
# (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache')
echo >&2
echo >&2 "warning: $ext ($module) is already loaded!"
echo >&2
continue
fi
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
if ! grep -q "$line" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
-114
View File
@@ -1,114 +0,0 @@
#!/bin/sh
set -e
extDir="$(php -d 'display_errors=stderr' -r 'echo ini_get("extension_dir");')"
cd "$extDir"
usage() {
echo "usage: $0 [options] module-name [module-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 --ini-name 0-apc.ini apcu apc"
echo
echo 'Possible values for module-name:'
find -maxdepth 1 \
-type f \
-name '*.so' \
-exec basename '{}' ';' \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?' --long 'help,ini-name:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
modules=
for module; do
if [ -z "$module" ]; then
continue
fi
if [ -f "$module.so" ] && ! [ -f "$module" ]; then
# allow ".so" to be optional
module="$module.so"
fi
if ! [ -f "$module" ]; then
echo >&2 "error: '$module' does not exist"
echo >&2
usage >&2
exit 1
fi
modules="$modules $module"
done
if [ -z "$modules" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi
for module in $modules; do
if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
absModule="$(readlink -f "$module")"
line="zend_extension=$absModule"
else
line="extension=$module"
fi
ext="$(basename "$module")"
ext="${ext%.*}"
if php -d 'display_errors=stderr' -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then
# this isn't perfect, but it's better than nothing
# (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache')
echo >&2
echo >&2 "warning: $ext ($module) is already loaded!"
echo >&2
continue
fi
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
if ! grep -q "$line" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del --no-network $apkDel
fi
-121
View File
@@ -1,121 +0,0 @@
#!/bin/sh
set -e
extDir="$(php -d 'display_errors=stderr' -r 'echo ini_get("extension_dir");')"
cd "$extDir"
usage() {
echo "usage: $0 [options] module-name [module-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 --ini-name 0-apc.ini apcu apc"
echo
echo 'Possible values for module-name:'
find -maxdepth 1 \
-type f \
-name '*.so' \
-exec basename '{}' ';' \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?' --long 'help,ini-name:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
modules=
for module; do
if [ -z "$module" ]; then
continue
fi
if ! [ -f "$module" ] && ! [ -f "$module.so" ]; then
echo >&2 "error: '$module' does not exist"
echo >&2
usage >&2
exit 1
fi
modules="$modules $module"
done
if [ -z "$modules" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi
for module in $modules; do
moduleFile="$module"
if [ -f "$module.so" ] && ! [ -f "$module" ]; then
moduleFile="$module.so"
fi
if readelf --wide --syms "$moduleFile" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
line="zend_extension=$module"
else
line="extension=$module"
fi
ext="$(basename "$module")"
ext="${ext%.*}"
if php -d 'display_errors=stderr' -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then
# this isn't perfect, but it's better than nothing
# (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache')
echo >&2
echo >&2 "warning: $ext ($module) is already loaded!"
echo >&2
continue
fi
case "$iniName" in
/*)
# allow an absolute path
ini="$iniName"
;;
*)
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -q "$line" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del --no-network $apkDel
fi
-121
View File
@@ -1,121 +0,0 @@
#!/bin/sh
set -e
extDir="$(php -d 'display_errors=stderr' -r 'echo ini_get("extension_dir");')"
cd "$extDir"
usage() {
echo "usage: $0 [options] module-name [module-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 --ini-name 0-apc.ini apcu apc"
echo
echo 'Possible values for module-name:'
find -maxdepth 1 \
-type f \
-name '*.so' \
-exec basename '{}' ';' \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?' --long 'help,ini-name:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
modules=
for module; do
if [ -z "$module" ]; then
continue
fi
if ! [ -f "$module" ] && ! [ -f "$module.so" ]; then
echo >&2 "error: '$module' does not exist"
echo >&2
usage >&2
exit 1
fi
modules="$modules $module"
done
if [ -z "$modules" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if \
[ -n "$PHPIZE_DEPS" ] \
&& ! apk info --installed .phpize-deps > /dev/null \
&& ! apk info --installed .phpize-deps-configure > /dev/null \
; then
apk add --no-cache --virtual '.docker-php-ext-enable-deps' binutils
apkDel='.docker-php-ext-enable-deps'
fi
fi
for module in $modules; do
moduleFile="$module"
if [ -f "$module.so" ] && ! [ -f "$module" ]; then
moduleFile="$module.so"
fi
if readelf --wide --syms "$moduleFile" | grep -q ' zend_extension_entry$'; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
line="zend_extension=$module"
else
line="extension=$module"
fi
ext="$(basename "$module")"
ext="${ext%.*}"
if php -d 'display_errors=stderr' -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then
# this isn't perfect, but it's better than nothing
# (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache')
echo >&2
echo >&2 "warning: $ext ($module) is already loaded!"
echo >&2
continue
fi
case "$iniName" in
/*)
# allow an absolute path
ini="$iniName"
;;
*)
ini="$PHP_INI_DIR/conf.d/${iniName:-"docker-php-ext-$ext.ini"}"
;;
esac
if ! grep -qFx -e "$line" -e "$line.so" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del --no-network $apkDel
fi
-122
View File
@@ -1,122 +0,0 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 [-jN] ext-name [ext-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop"
echo
echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure'
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
j=1
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--jobs|-j) j="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
exts=
for ext; do
if [ -z "$ext" ]; then
continue
fi
if [ ! -d "$ext" ]; then
echo >&2 "error: $PWD/$ext does not exist"
echo >&2
usage >&2
exit 1
fi
exts="$exts $ext"
done
if [ -z "$exts" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if [ -n "$PHPIZE_DEPS" ]; then
if apk info --installed .phpize-deps-configure > /dev/null; then
apkDel='.phpize-deps-configure'
elif ! apk info --installed .phpize-deps > /dev/null; then
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
apkDel='.phpize-deps'
fi
fi
fi
popDir="$PWD"
for ext in $exts; do
cd "$ext"
[ -e Makefile ] || docker-php-ext-configure "$ext"
make -j"$j"
make -j"$j" install
find modules \
-maxdepth 1 \
-name '*.so' \
-exec basename '{}' ';' \
| xargs -r docker-php-ext-enable
make -j"$j" clean
cd "$popDir"
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del $apkDel
fi
if [ -e /usr/src/php/.docker-delete-me ]; then
docker-php-source delete
fi
-122
View File
@@ -1,122 +0,0 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 [-jN] ext-name [ext-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop"
echo
echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure'
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
j=1
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--jobs|-j) j="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
exts=
for ext; do
if [ -z "$ext" ]; then
continue
fi
if [ ! -d "$ext" ]; then
echo >&2 "error: $PWD/$ext does not exist"
echo >&2
usage >&2
exit 1
fi
exts="$exts $ext"
done
if [ -z "$exts" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if [ -n "$PHPIZE_DEPS" ]; then
if apk info --installed .phpize-deps-configure > /dev/null; then
apkDel='.phpize-deps-configure'
elif ! apk info --installed .phpize-deps > /dev/null; then
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
apkDel='.phpize-deps'
fi
fi
fi
popDir="$PWD"
for ext in $exts; do
cd "$ext"
[ -e Makefile ] || docker-php-ext-configure "$ext"
make -j"$j"
make -j"$j" install
find modules \
-maxdepth 1 \
-name '*.so' \
-exec basename '{}' ';' \
| xargs -r docker-php-ext-enable
make -j"$j" clean
cd "$popDir"
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del --no-network $apkDel
fi
if [ -e /usr/src/php/.docker-delete-me ]; then
docker-php-source delete
fi
-124
View File
@@ -1,124 +0,0 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 [-jN] [--ini-name file.ini] ext-name [ext-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop"
echo
echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure'
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?j:' --long 'help,ini-name:,jobs:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
j=1
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--jobs|-j) j="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
exts=
for ext; do
if [ -z "$ext" ]; then
continue
fi
if [ ! -d "$ext" ]; then
echo >&2 "error: $PWD/$ext does not exist"
echo >&2
usage >&2
exit 1
fi
exts="$exts $ext"
done
if [ -z "$exts" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if [ -n "$PHPIZE_DEPS" ]; then
if apk info --installed .phpize-deps-configure > /dev/null; then
apkDel='.phpize-deps-configure'
elif ! apk info --installed .phpize-deps > /dev/null; then
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
apkDel='.phpize-deps'
fi
fi
fi
popDir="$PWD"
for ext in $exts; do
cd "$ext"
[ -e Makefile ] || docker-php-ext-configure "$ext"
make -j"$j"
make -j"$j" install
find modules \
-maxdepth 1 \
-name '*.so' \
-exec basename '{}' ';' \
| xargs -r docker-php-ext-enable ${iniName:+--ini-name "$iniName"}
make -j"$j" clean
cd "$popDir"
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del --no-network $apkDel
fi
if [ -e /usr/src/php/.docker-delete-me ]; then
docker-php-source delete
fi
-130
View File
@@ -1,130 +0,0 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 [-jN] [--ini-name file.ini] ext-name [ext-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop"
echo
echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure'
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?j:' --long 'help,ini-name:,jobs:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
j=1
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--jobs|-j) j="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
exts=
for ext; do
if [ -z "$ext" ]; then
continue
fi
if [ ! -d "$ext" ]; then
echo >&2 "error: $PWD/$ext does not exist"
echo >&2
usage >&2
exit 1
fi
exts="$exts $ext"
done
if [ -z "$exts" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if [ -n "$PHPIZE_DEPS" ]; then
if apk info --installed .phpize-deps-configure > /dev/null; then
apkDel='.phpize-deps-configure'
elif ! apk info --installed .phpize-deps > /dev/null; then
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
apkDel='.phpize-deps'
fi
fi
fi
popDir="$PWD"
for ext in $exts; do
cd "$ext"
[ -e Makefile ] || docker-php-ext-configure "$ext"
make -j"$j"
find modules \
-maxdepth 1 \
-name '*.so' \
-exec sh -euxc ' \
strip --strip-all "$@" || :
' -- '{}' +
make -j"$j" install
find modules \
-maxdepth 1 \
-name '*.so' \
-exec basename '{}' ';' \
| xargs -r docker-php-ext-enable ${iniName:+--ini-name "$iniName"}
make -j"$j" clean
cd "$popDir"
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del --no-network $apkDel
fi
if [ -e /usr/src/php/.docker-delete-me ]; then
docker-php-source delete
fi
-143
View File
@@ -1,143 +0,0 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 [-jN] [--ini-name file.ini] ext-name [ext-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop"
echo
echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure'
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?j:' --long 'help,ini-name:,jobs:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
j=1
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--jobs|-j) j="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
exts=
for ext; do
if [ -z "$ext" ]; then
continue
fi
if [ ! -d "$ext" ]; then
echo >&2 "error: $PWD/$ext does not exist"
echo >&2
usage >&2
exit 1
fi
exts="$exts $ext"
done
if [ -z "$exts" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if [ -n "$PHPIZE_DEPS" ]; then
if apk info --installed .phpize-deps-configure > /dev/null; then
apkDel='.phpize-deps-configure'
elif ! apk info --installed .phpize-deps > /dev/null; then
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
apkDel='.phpize-deps'
fi
fi
fi
popDir="$PWD"
for ext in $exts; do
cd "$ext"
[ -e Makefile ] || docker-php-ext-configure "$ext"
make -j"$j"
if ! php -n -d 'display_errors=stderr' -r 'exit(ZEND_DEBUG_BUILD ? 0 : 1);' > /dev/null; then
# only "strip" modules if we aren't using a debug build of PHP
# (none of our builds are debug builds, but PHP might be recompiled with "--enable-debug" configure option)
# https://github.com/docker-library/php/issues/1268
find modules \
-maxdepth 1 \
-name '*.so' \
-exec sh -euxc ' \
strip --strip-all "$@" || :
' -- '{}' +
fi
make -j"$j" install
find modules \
-maxdepth 1 \
-name '*.so' \
-exec basename '{}' ';' \
| xargs -r docker-php-ext-enable ${iniName:+--ini-name "$iniName"}
make -j"$j" clean
cd "$popDir"
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del --no-network $apkDel
fi
if [ -e /usr/src/php/.docker-delete-me ]; then
docker-php-source delete
fi
-143
View File
@@ -1,143 +0,0 @@
#!/bin/sh
set -e
# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS
srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z "$srcExists" ]; then
touch /usr/src/php/.docker-delete-me
fi
cd /usr/src/php/ext
usage() {
echo "usage: $0 [-jN] [--ini-name file.ini] ext-name [ext-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop"
echo
echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure'
echo
echo 'Possible values for ext-name:'
find . \
-mindepth 2 \
-maxdepth 2 \
-type f \
-name 'config.m4' \
| xargs -n1 dirname \
| xargs -n1 basename \
| sort \
| xargs
echo
echo 'Some of the above modules are already compiled into PHP; please check'
echo 'the output of "php -i" to see which modules are already loaded.'
}
opts="$(getopt -o 'h?j:' --long 'help,ini-name:,jobs:' -- "$@" || { usage >&2 && false; })"
eval set -- "$opts"
j=1
iniName=
while true; do
flag="$1"
shift
case "$flag" in
--help|-h|'-?') usage && exit 0 ;;
--ini-name) iniName="$1" && shift ;;
--jobs|-j) j="$1" && shift ;;
--) break ;;
*)
{
echo "error: unknown flag: $flag"
usage
} >&2
exit 1
;;
esac
done
exts=
for ext; do
if [ -z "$ext" ]; then
continue
fi
if [ ! -d "$ext" ]; then
echo >&2 "error: $PWD/$ext does not exist"
echo >&2
usage >&2
exit 1
fi
exts="$exts $ext"
done
if [ -z "$exts" ]; then
usage >&2
exit 1
fi
pm='unknown'
if [ -e /lib/apk/db/installed ]; then
pm='apk'
fi
apkDel=
if [ "$pm" = 'apk' ]; then
if [ -n "$PHPIZE_DEPS" ]; then
if apk info --installed .phpize-deps-configure > /dev/null; then
apkDel='.phpize-deps-configure'
elif ! apk info --installed .phpize-deps > /dev/null; then
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS
apkDel='.phpize-deps'
fi
fi
fi
popDir="$PWD"
for ext in $exts; do
cd "$ext"
[ -e Makefile ] || docker-php-ext-configure "$ext"
make -j"$j"
if ! php -n -d 'display_errors=stderr' -r 'exit(ZEND_DEBUG_BUILD ? 0 : 1);' > /dev/null; then
# only "strip" modules if we aren't using a debug build of PHP
# (none of our builds are debug builds, but PHP might be recompiled with "--enable-debug" configure option)
# https://github.com/docker-library/php/issues/1268
find modules \
-maxdepth 1 \
-name '*.so' \
-exec sh -euxc ' \
strip --strip-all "$@" || :
' -- '{}' +
fi
make -j"$j" install
find modules \
-maxdepth 1 \
-name '*.so' \
-exec basename '{}' '.so' ';' \
| xargs -r docker-php-ext-enable ${iniName:+--ini-name "$iniName"}
make -j"$j" clean
cd "$popDir"
done
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then
apk del --no-network $apkDel
fi
if [ -e /usr/src/php/.docker-delete-me ]; then
docker-php-source delete
fi
-34
View File
@@ -1,34 +0,0 @@
#!/bin/sh
set -e
dir=/usr/src/php
usage() {
echo "usage: $0 COMMAND"
echo
echo "Manage php source tarball lifecycle."
echo
echo "Commands:"
echo " extract extract php source tarball into directory $dir if not already done."
echo " delete delete extracted php source located into $dir if not already done."
echo
}
case "$1" in
extract)
mkdir -p "$dir"
if [ ! -f "$dir/.docker-extracted" ]; then
tar -Jxf /usr/src/php.tar.xz -C "$dir" --strip-components=1
touch "$dir/.docker-extracted"
fi
;;
delete)
rm -rf "$dir"
;;
*)
usage
exit 1
;;
esac