1
0
mirror of https://github.com/docker-library/php.git synced 2025-04-19 03:42:14 +03:00

Add initial jq-based templating engine

This commit is contained in:
Tianon Gravi 2020-08-17 22:12:07 -07:00
parent b44c4f1732
commit 165f8ca09c
61 changed files with 598 additions and 598 deletions

4
.gitattributes vendored Normal file
View File

@ -0,0 +1,4 @@
**/Dockerfile linguist-generated
**/apache2-foreground linguist-generated
**/docker-php-* linguist-generated
Dockerfile*.template linguist-language=Dockerfile

22
.github/workflows/verify-templating.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Verify Templating
on:
pull_request:
push:
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
apply-templates:
name: Check For Uncomitted Changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Apply Templates
run: ./apply-templates.sh
- name: Check Git Status
run: |
status="$(git status --short)"
[ -z "$status" ]

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.jq-template.awk

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -177,6 +174,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -186,6 +184,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -178,6 +176,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -187,7 +186,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -232,4 +230,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -178,6 +176,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -187,6 +186,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -177,6 +174,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -186,6 +184,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -178,6 +176,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -187,7 +186,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -232,4 +230,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -178,6 +176,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -187,6 +186,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,7 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
@ -109,7 +108,6 @@ RUN { \
ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -258,6 +256,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -270,7 +269,6 @@ RUN docker-php-ext-enable sodium
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
@ -279,4 +277,3 @@ WORKDIR /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -198,6 +195,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -210,6 +208,4 @@ RUN docker-php-ext-enable sodium
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -199,6 +197,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -211,7 +210,6 @@ RUN docker-php-ext-enable sodium
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -256,4 +254,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -199,6 +197,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -211,6 +210,4 @@ RUN docker-php-ext-enable sodium
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,7 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
@ -109,7 +108,6 @@ RUN { \
ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -166,7 +164,6 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -177,7 +174,6 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
@ -270,6 +266,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -279,7 +276,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
@ -288,4 +284,3 @@ WORKDIR /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -106,7 +103,6 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -117,7 +113,6 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
@ -210,6 +205,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -219,6 +215,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -107,7 +105,6 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -118,7 +115,6 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
@ -211,6 +207,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -220,7 +217,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -265,4 +261,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -107,7 +105,6 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -118,7 +115,6 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
@ -211,6 +207,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -220,6 +217,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -177,6 +174,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -186,6 +184,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -178,6 +176,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -187,7 +186,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -234,4 +232,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -178,6 +176,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -187,6 +186,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -177,6 +174,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -186,6 +184,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -178,6 +176,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -187,7 +186,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -234,4 +232,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -178,6 +176,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -187,6 +186,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,7 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
@ -109,7 +108,6 @@ RUN { \
ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -258,6 +256,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -270,7 +269,6 @@ RUN docker-php-ext-enable sodium
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
@ -279,4 +277,3 @@ WORKDIR /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -198,6 +195,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -210,6 +208,4 @@ RUN docker-php-ext-enable sodium
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -199,6 +197,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -211,7 +210,6 @@ RUN docker-php-ext-enable sodium
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -258,4 +256,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -199,6 +197,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -211,6 +210,4 @@ RUN docker-php-ext-enable sodium
RUN { echo '#!/bin/sh'; echo 'exec pkg-config "$@" freetype2'; } > /usr/local/bin/freetype-config && chmod +x /usr/local/bin/freetype-config
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,7 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
@ -109,7 +108,6 @@ RUN { \
ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -166,7 +164,6 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -177,7 +174,6 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
@ -270,6 +266,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -279,7 +276,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
@ -288,4 +284,3 @@ WORKDIR /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -106,7 +103,6 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -117,7 +113,6 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
@ -210,6 +205,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -219,6 +215,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -107,7 +105,6 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -118,7 +115,6 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
@ -211,6 +207,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -220,7 +217,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -267,4 +263,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -107,7 +105,6 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -118,7 +115,6 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
@ -211,6 +207,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -220,6 +217,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -148,7 +145,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -182,6 +180,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -191,6 +190,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -149,7 +147,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -183,6 +182,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -192,7 +192,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -239,4 +238,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -149,7 +147,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -183,6 +182,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -192,6 +192,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -148,7 +145,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -182,6 +180,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -191,6 +190,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -149,7 +147,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -183,6 +182,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -192,7 +192,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -239,4 +238,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -149,7 +147,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -183,6 +182,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -192,6 +192,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,7 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
@ -109,7 +108,6 @@ RUN { \
ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -224,7 +222,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -262,6 +261,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -271,7 +271,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
@ -280,4 +279,3 @@ WORKDIR /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -164,7 +161,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -202,6 +200,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -211,6 +210,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -165,7 +163,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -203,6 +202,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -212,7 +212,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -259,4 +258,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-maintainer-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -165,7 +163,8 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
# bundled pcre does not support JIT on s390x
@ -203,6 +202,7 @@ RUN set -eux; \
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
# smoke test
php --version
@ -212,6 +212,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -185,6 +182,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -46,9 +46,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -186,7 +184,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -233,4 +230,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,7 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV APACHE_CONFDIR /etc/apache2
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars
@ -109,7 +108,6 @@ RUN { \
ENV PHP_EXTRA_BUILD_DEPS apache2-dev
ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -265,7 +263,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
@ -274,4 +271,3 @@ WORKDIR /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,6 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -205,6 +202,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -206,7 +204,6 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
WORKDIR /var/www/html
RUN set -eux; \
@ -253,4 +250,3 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]
##</autogenerated>##

View File

@ -1,5 +1,5 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
@ -48,9 +48,7 @@ RUN set -eux; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-zts --disable-cgi
##</autogenerated>##
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
@ -206,6 +204,4 @@ COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
RUN docker-php-ext-enable sodium
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##

View File

@ -1,4 +1,5 @@
FROM alpine:%%ALPINE_VERSION%%
{{ include "version-id" -}}
FROM {{ env.from }}
# dependencies required for running "phpize"
# these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
@ -39,10 +40,11 @@ RUN set -eux; \
mkdir -p /var/www/html; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
{{
if env.variantBlock1 != "" then
"\n" + env.variantBlock1 + "\n"
else "" end
}}
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -53,11 +55,11 @@ ENV PHP_CFLAGS="-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_
ENV PHP_CPPFLAGS="$PHP_CFLAGS"
ENV PHP_LDFLAGS="-Wl,-O1 -pie"
ENV GPG_KEYS %%GPG_KEYS%%
ENV GPG_KEYS {{ .gpgKeys }}
ENV PHP_VERSION %%PHP_VERSION%%
ENV PHP_URL="%%PHP_URL%%" PHP_ASC_URL="%%PHP_ASC_URL%%"
ENV PHP_SHA256="%%PHP_SHA256%%" PHP_MD5="%%PHP_MD5%%"
ENV PHP_VERSION {{ .version }}
ENV PHP_URL="{{ .url }}" PHP_ASC_URL="{{ .ascUrl // "" }}"
ENV PHP_SHA256="{{ .sha256 // "" }}" PHP_MD5="{{ .md5 // "" }}"
RUN set -eux; \
\
@ -97,10 +99,19 @@ RUN set -eux; \
coreutils \
curl-dev \
libedit-dev \
{{ if (.version | version_id) >= ("7.2" | version_id) then ( -}}
libsodium-dev \
{{ ) else "" end -}}
libxml2-dev \
{{
# https://github.com/docker-library/php/issues/888
if (.version | version_id) >= ("7.4" | version_id) then (
-}}
linux-headers \
{{ ) else "" end -}}
{{ if (.version | version_id) >= ("7.4" | version_id) then ( -}}
oniguruma-dev \
{{ ) else "" end -}}
openssl-dev \
sqlite-dev \
; \
@ -131,8 +142,10 @@ RUN set -eux; \
--enable-mysqlnd \
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
--with-password-argon2 \
{{ if (.version | version_id) >= ("7.2" | version_id) then ( -}}
# https://wiki.php.net/rfc/libsodium
--with-sodium=shared \
{{ ) else "" end -}}
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
--with-pdo-sqlite=/usr \
--with-sqlite3=/usr \
@ -142,9 +155,12 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
{{ if (.version | version_id) | . >= ("7.4" | version_id) and . < ("8" | version_id) then ( -}}
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
{{ ) else "" end -}}
# bundled pcre does not support JIT on s390x
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
$(test "$gnuArch" = 's390x-linux-musl' && echo '--without-pcre-jit') \
@ -173,18 +189,26 @@ RUN set -eux; \
\
apk del --no-network .build-deps; \
\
{{ if (.version | version_id) < ("8" | version_id) then ( -}}
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
{{ ) else "" end -}}
# smoke test
php --version
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
{{ if (.version | version_id) >= ("7.2" | version_id) then ( -}}
# 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
{{ ) else "" end -}}
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##
{{
if env.variantBlock2 != "" then
env.variantBlock2 + "\n"
else "" end
+ "CMD " + env.cmd
}}

View File

@ -5,4 +5,3 @@ COPY apache2-foreground /usr/local/bin/
WORKDIR /var/www/html
EXPOSE 80
CMD ["apache2-foreground"]

View File

@ -1,4 +1,5 @@
FROM debian:%%DEBIAN_TAG%%
{{ include "version-id" -}}
FROM {{ env.from }}
# prevent Debian's PHP packages from being installed
# https://github.com/docker-library/php/pull/542
@ -41,10 +42,11 @@ RUN set -eux; \
mkdir -p /var/www/html; \
chown www-data:www-data /var/www/html; \
chmod 777 /var/www/html
##<autogenerated>##
##</autogenerated>##
{{
if env.variantBlock1 != "" then
"\n" + env.variantBlock1 + "\n"
else "" end
}}
# Apply stack smash protection to functions using local buffers and alloca()
# Make PHP's main executable position-independent (improves ASLR security mechanism, and has no performance impact on x86_64)
# Enable optimization (-O2)
@ -55,11 +57,11 @@ ENV PHP_CFLAGS="-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_
ENV PHP_CPPFLAGS="$PHP_CFLAGS"
ENV PHP_LDFLAGS="-Wl,-O1 -pie"
ENV GPG_KEYS %%GPG_KEYS%%
ENV GPG_KEYS {{ .gpgKeys }}
ENV PHP_VERSION %%PHP_VERSION%%
ENV PHP_URL="%%PHP_URL%%" PHP_ASC_URL="%%PHP_ASC_URL%%"
ENV PHP_SHA256="%%PHP_SHA256%%" PHP_MD5="%%PHP_MD5%%"
ENV PHP_VERSION {{ .version }}
ENV PHP_URL="{{ .url }}" PHP_ASC_URL="{{ .ascUrl // "" }}"
ENV PHP_SHA256="{{ .sha256 // "" }}" PHP_MD5="{{ .md5 // "" }}"
RUN set -eux; \
\
@ -100,7 +102,10 @@ COPY docker-php-source /usr/local/bin/
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
##<argon2-stretch>##
{{
# stretch needs to pull argon2 from buster
if env.suite == "stretch" then (
-}}
sed -e 's/stretch/buster/g' /etc/apt/sources.list > /etc/apt/sources.list.d/buster.list; \
{ \
echo 'Package: *'; \
@ -111,14 +116,21 @@ RUN set -eux; \
echo 'Pin: release n=buster*'; \
echo 'Pin-Priority: 990'; \
} > /etc/apt/preferences.d/argon2-buster; \
##</argon2-stretch>##
{{ ) else "" end -}}
apt-get update; \
apt-get install -y --no-install-recommends \
libargon2-dev \
libcurl4-openssl-dev \
libedit-dev \
{{
# oniguruma is part of mbstring in php 7.4+
if (.version | version_id) >= ("7.4" | version_id) then (
-}}
libonig-dev \
{{ ) else "" end -}}
{{ if (.version | version_id) >= ("7.2" | version_id) then ( -}}
libsodium-dev \
{{ ) else "" end -}}
libsqlite3-dev \
libssl-dev \
libxml2-dev \
@ -159,8 +171,10 @@ RUN set -eux; \
--enable-mysqlnd \
# https://wiki.php.net/rfc/argon2_password_hash (7.2+)
--with-password-argon2 \
{{ if (.version | version_id) >= ("7.2" | version_id) then ( -}}
# https://wiki.php.net/rfc/libsodium
--with-sodium=shared \
{{ ) else "" end -}}
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
--with-pdo-sqlite=/usr \
--with-sqlite3=/usr \
@ -170,9 +184,12 @@ RUN set -eux; \
--with-openssl \
--with-zlib \
\
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear") and will be removed in PHP 8+; see also https://github.com/docker-library/php/issues/846#issuecomment-505638494
{{ if (.version | version_id) | . >= ("7.4" | version_id) and . < ("8" | version_id) then ( -}}
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
# ... and are removed in PHP 8+; see also https://github.com/docker-library/php/pull/847#issuecomment-505638229
--with-pear \
\
{{ ) else "" end -}}
# bundled pcre does not support JIT on s390x
# https://manpages.debian.org/stretch/libpcre3-dev/pcrejit.3.en.html#AVAILABILITY_OF_JIT_SUPPORT
$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
@ -205,21 +222,37 @@ RUN set -eux; \
; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
\
{{ if (.version | version_id) < ("8" | version_id) then ( -}}
# update pecl channel definitions https://github.com/docker-library/php/issues/443
pecl update-channels; \
rm -rf /tmp/pear ~/.pearrc; \
\
{{ ) else "" end -}}
# smoke test
php --version
COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
{{ if (.version | version_id) >= ("7.2" | version_id) then ( -}}
# 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
{{ ) else "" end -}}
{{
# https://github.com/docker-library/php/issues/865
# https://bugs.php.net/bug.php?id=76324
# https://github.com/php/php-src/pull/3632
# https://github.com/php/php-src/commit/2d03197749696ac3f8effba6b7977b0d8729fef3
if env.suite != "stretch" and (.version | version_id) < ("7.4" | version_id) then (
-}}
# 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
{{ ) else "" end -}}
ENTRYPOINT ["docker-php-entrypoint"]
##<autogenerated>##
CMD ["php", "-a"]
##</autogenerated>##
{{
if env.variantBlock2 != "" then
env.variantBlock2 + "\n"
else "" end
+ "CMD " + env.cmd
}}

View File

@ -1,3 +1,4 @@
{{ include "version-id" -}}
WORKDIR /var/www/html
RUN set -eux; \
@ -18,7 +19,9 @@ RUN set -eux; \
{ \
echo '[global]'; \
echo 'error_log = /proc/self/fd/2'; \
{{ if (.version | version_id) >= ("7.3" | version_id) then ( -}}
echo; echo '; https://github.com/docker-library/php/pull/725#issuecomment-443540114'; echo 'log_limit = 8192'; \
{{ ) else "" end -}}
echo; \
echo '[www]'; \
echo '; if we send this to /proc/self/fd/1, it never appears'; \
@ -28,7 +31,9 @@ RUN set -eux; \
echo; \
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
echo 'catch_workers_output = yes'; \
{{ if (.version | version_id) >= ("7.3" | version_id) then ( -}}
echo 'decorate_workers_output = no'; \
{{ ) else "" end -}}
} | tee php-fpm.d/docker.conf; \
{ \
echo '[global]'; \
@ -43,4 +48,3 @@ RUN set -eux; \
STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD ["php-fpm"]

View File

@ -0,0 +1,8 @@
{{ include "version-id" -}}
ENV PHP_EXTRA_CONFIGURE_ARGS {{
if (.version | version_id) >= ("8" | version_id) then
"--enable-zts"
else
"--enable-maintainer-zts"
end
}} --disable-cgi

82
apply-templates.sh Executable file
View File

@ -0,0 +1,82 @@
#!/usr/bin/env bash
set -Eeuo pipefail
[ -f versions.json ] # run "versions.sh" first
jqt='.jq-template.awk'
if [ -n "${BASHBREW_SCRIPTS:-}" ]; then
jqt="$BASHBREW_SCRIPTS/jq-template.awk"
elif [ "$BASH_SOURCE" -nt "$jqt" ]; then
wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/5f0c26381fb7cc78b2d217d58007800bdcfbcfa1/scripts/jq-template.awk'
fi
if [ "$#" -eq 0 ]; then
versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)"
eval "set -- $versions"
fi
generated_warning() {
cat <<-EOH
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
EOH
}
for version; do
export version
variants="$(jq -r '.[env.version].variants | map(@sh) | join(" ")' versions.json)"
eval "variants=( $variants )"
for dir in "${variants[@]}"; do
suite="$(dirname "$dir")" # "buster", etc
variant="$(basename "$dir")" # "cli", etc
export suite variant
alpineVer="${suite#alpine}" # "3.12", etc
if [ "$suite" != "$alpineVer" ]; then
template='Dockerfile-alpine.template'
from="alpine:$alpineVer"
else
template='Dockerfile-debian.template'
from="debian:$suite-slim"
fi
export from
case "$variant" in
apache) cmd='["apache2-foreground"]' ;;
fpm) cmd='["php-fpm"]' ;;
*) cmd='["php", "-a"]' ;;
esac
export cmd
echo "processing $version/$dir ..."
variantBlock1="$(if [ -f "Dockerfile-$variant-block-1.template" ]; then gawk -f "$jqt" "Dockerfile-$variant-block-1.template"; fi)"
variantBlock2="$(if [ -f "Dockerfile-$variant-block-2.template" ]; then gawk -f "$jqt" "Dockerfile-$variant-block-2.template"; fi)"
export variantBlock1 variantBlock2
{
generated_warning
gawk -f "$jqt" "$template"
} > "$version/$dir/Dockerfile"
cp -a \
docker-php-entrypoint \
docker-php-ext-* \
docker-php-source \
"$version/$dir/"
if [ "$variant" = 'apache' ]; then
cp -a apache2-foreground "$version/$dir/"
fi
cmd="$(jq <<<"$cmd" -r '.[0]')"
if [ "$cmd" != 'php' ]; then
sed -i -e 's! php ! '"$cmd"' !g' "$version/$dir/docker-php-entrypoint"
fi
done
done

View File

@ -20,11 +20,13 @@ declare -A alpineVersions=(
self="$(basename "$BASH_SOURCE")"
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
versions=( */ )
versions=( "${versions[@]%/}" )
if [ "$#" -eq 0 ]; then
versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)"
eval "set -- $versions"
fi
# sort version numbers with highest first
IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -rV) ); unset IFS
IFS=$'\n'; set -- $(sort -rV <<<"$*"); unset IFS
# get the most recent commit which modified any of "$@"
fileCommit() {
@ -79,68 +81,63 @@ join() {
echo "${out#$sep}"
}
for version in "${versions[@]}"; do
for version; do
export version
variants="$(jq -r '.[env.version].variants | map(@sh) | join(" ")' versions.json)"
eval "variants=( $variants )"
versionAliases=(
$version
${aliases[$version]:-}
)
# order here controls the order of the library/ file
for suite in \
buster stretch \
alpine{3.12,3.11} \
; do
for variant in \
cli \
apache \
fpm \
zts \
; do
dir="$version/$suite/$variant"
[ -f "$dir/Dockerfile" ] || continue
for dir in "${variants[@]}"; do
suite="$(dirname "$dir")" # "buster", etc
variant="$(basename "$dir")" # "cli", etc
dir="$version/$dir"
[ -f "$dir/Dockerfile" ] || continue
commit="$(dirCommit "$dir")"
fullVersion="$(git show "$commit":"$dir/Dockerfile" | awk '$1 == "ENV" && $2 == "PHP_VERSION" { print $3; exit }')"
fullVersion="$(jq -r '.[env.version].version' versions.json)"
baseAliases=( $fullVersion "${versionAliases[@]}" )
variantAliases=( "${baseAliases[@]/%/-$variant}" )
variantAliases=( "${variantAliases[@]//latest-/}" )
baseAliases=( $fullVersion "${versionAliases[@]}" )
variantAliases=( "${baseAliases[@]/%/-$variant}" )
variantAliases=( "${variantAliases[@]//latest-/}" )
if [ "$variant" = 'cli' ]; then
variantAliases+=( "${baseAliases[@]}" )
fi
if [ "$variant" = 'cli' ]; then
variantAliases+=( "${baseAliases[@]}" )
fi
suiteVariantAliases=( "${variantAliases[@]/%/-$suite}" )
if [ "${suite#alpine}" = "${alpineVersions[$version]:-$defaultAlpineVersion}" ] ; then
variantAliases=( "${variantAliases[@]/%/-alpine}" )
elif [ "$suite" != "${debianSuites[$version]:-$defaultDebianSuite}" ]; then
variantAliases=()
fi
variantAliases=( "${suiteVariantAliases[@]}" ${variantAliases[@]+"${variantAliases[@]}"} )
variantAliases=( "${variantAliases[@]//latest-/}" )
suiteVariantAliases=( "${variantAliases[@]/%/-$suite}" )
if [ "${suite#alpine}" = "${alpineVersions[$version]:-$defaultAlpineVersion}" ] ; then
variantAliases=( "${variantAliases[@]/%/-alpine}" )
elif [ "$suite" != "${debianSuites[$version]:-$defaultDebianSuite}" ]; then
variantAliases=()
fi
variantAliases=( "${suiteVariantAliases[@]}" ${variantAliases[@]+"${variantAliases[@]}"} )
variantAliases=( "${variantAliases[@]//latest-/}" )
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")"
variantArches="${parentRepoToArches[$variantParent]}"
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$dir/Dockerfile")"
variantArches="${parentRepoToArches[$variantParent]}"
if [ "$version" = '7.2' ]; then
# PHP 7.2 doesn't compile on MIPS:
# /usr/src/php/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c:506:3: error: a label can only be part of a statement and a declaration is not a statement
# sljit_sw fir;
# ^~~~~~~~
# According to https://github.com/openwrt/packages/issues/5333 + https://github.com/openwrt/packages/pull/5335,
# https://github.com/svn2github/pcre/commit/e5045fd31a2e171dff305665e2b921d7c93427b8#diff-291428aa92cf90de0f2486f9c2829158
# *might* fix it, but it's likely not worth it just for PHP 7.2 on MIPS (since 7.3 and 7.4 work fine).
variantArches="$(echo " $variantArches " | sed -e 's/ mips64le / /g')"
fi
if [ "$version" = '7.2' ]; then
# PHP 7.2 doesn't compile on MIPS:
# /usr/src/php/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c:506:3: error: a label can only be part of a statement and a declaration is not a statement
# sljit_sw fir;
# ^~~~~~~~
# According to https://github.com/openwrt/packages/issues/5333 + https://github.com/openwrt/packages/pull/5335,
# https://github.com/svn2github/pcre/commit/e5045fd31a2e171dff305665e2b921d7c93427b8#diff-291428aa92cf90de0f2486f9c2829158
# *might* fix it, but it's likely not worth it just for PHP 7.2 on MIPS (since 7.3 and 7.4 work fine).
variantArches="$(echo " $variantArches " | sed -e 's/ mips64le / /g')"
fi
echo
cat <<-EOE
Tags: $(join ', ' "${variantAliases[@]}")
Architectures: $(join ', ' $variantArches)
GitCommit: $commit
Directory: $dir
EOE
done
commit="$(dirCommit "$dir")"
echo
cat <<-EOE
Tags: $(join ', ' "${variantAliases[@]}")
Architectures: $(join ', ' $variantArches)
GitCommit: $commit
Directory: $dir
EOE
done
done

257
update.sh
View File

@ -1,260 +1,7 @@
#!/usr/bin/env bash
set -Eeuo pipefail
# https://www.php.net/gpg-keys.php
declare -A gpgKeys=(
# https://wiki.php.net/todo/php80
# pollita & carusogabriel
# https://www.php.net/gpg-keys.php#gpg-8.0
[8.0]='1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F'
# https://wiki.php.net/todo/php74
# petk & derick
# https://www.php.net/gpg-keys.php#gpg-7.4
[7.4]='42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312'
# https://wiki.php.net/todo/php73
# cmb & stas
# https://www.php.net/gpg-keys.php#gpg-7.3
[7.3]='CBAF69F173A0FEA4B537F470D66C9593118BCCB6 F38252826ACD957EF380D39F2F7956BC5DA04B5D'
# https://wiki.php.net/todo/php72
# pollita & remi
# https://www.php.net/downloads.php#gpg-7.2
# https://www.php.net/gpg-keys.php#gpg-7.2
[7.2]='1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F'
)
# see https://www.php.net/downloads.php
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
versions=( "$@" )
if [ ${#versions[@]} -eq 0 ]; then
versions=( */ )
fi
versions=( "${versions[@]%/}" )
generated_warning() {
cat <<-EOH
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
EOH
}
for version in "${versions[@]}"; do
rcVersion="${version%-rc}"
# "7", "5", etc
majorVersion="${rcVersion%%.*}"
# "2", "1", "6", etc
minorVersion="${rcVersion#$majorVersion.}"
minorVersion="${minorVersion%%.*}"
# scrape the relevant API based on whether we're looking for pre-releases
apiUrl="https://www.php.net/releases/index.php?json&max=100&version=${rcVersion%%.*}"
apiJqExpr='
(keys[] | select(startswith("'"$rcVersion"'."))) as $version
| [ $version, (
.[$version].source[]
| select(.filename | endswith(".xz"))
|
"https://www.php.net/distributions/" + .filename,
"https://www.php.net/distributions/" + .filename + ".asc",
.sha256 // "",
.md5 // ""
) ]
'
if [ "$rcVersion" != "$version" ]; then
apiUrl='https://qa.php.net/api.php?type=qa-releases&format=json'
apiJqExpr='
.releases[]
| select(.version | startswith("'"$rcVersion"'."))
| [
.version,
.files.xz.path // "",
"",
.files.xz.sha256 // "",
.files.xz.md5 // ""
]
'
fi
IFS=$'\n'
possibles=( $(
curl -fsSL "$apiUrl" \
| jq --raw-output "$apiJqExpr | @sh" \
| sort -rV
) )
unset IFS
if [ "${#possibles[@]}" -eq 0 ]; then
echo >&2
echo >&2 "error: unable to determine available releases of $version"
echo >&2
exit 1
fi
# format of "possibles" array entries is "VERSION URL.TAR.XZ URL.TAR.XZ.ASC SHA256 MD5" (each value shell quoted)
# see the "apiJqExpr" values above for more details
eval "possi=( ${possibles[0]} )"
fullVersion="${possi[0]}"
url="${possi[1]}"
ascUrl="${possi[2]}"
sha256="${possi[3]}"
md5="${possi[4]}"
gpgKey="${gpgKeys[$rcVersion]}"
if [ -z "$gpgKey" ]; then
echo >&2 "ERROR: missing GPG key fingerprint for $version"
echo >&2 " try looking on https://www.php.net/downloads.php#gpg-$version"
exit 1
fi
# if we don't have a .asc URL, let's see if we can figure one out :)
if [ -z "$ascUrl" ] && wget -q --spider "$url.asc"; then
ascUrl="$url.asc"
fi
dockerfiles=()
for suite in buster stretch alpine{3.12,3.11}; do
[ -d "$version/$suite" ] || continue
alpineVer="${suite#alpine}"
baseDockerfile=Dockerfile-debian.template
if [ "${suite#alpine}" != "$suite" ]; then
baseDockerfile=Dockerfile-alpine.template
fi
for variant in cli apache fpm zts; do
[ -d "$version/$suite/$variant" ] || continue
{ generated_warning; cat "$baseDockerfile"; } > "$version/$suite/$variant/Dockerfile"
echo "Generating $version/$suite/$variant/Dockerfile from $baseDockerfile + $variant-Dockerfile-block-*"
gawk -i inplace -v variant="$variant" '
$1 == "##</autogenerated>##" { ia = 0 }
!ia { print }
$1 == "##<autogenerated>##" { ia = 1; ab++; ac = 0; if (system("test -f " variant "-Dockerfile-block-" ab) != 0) { ia = 0 } }
ia { ac++ }
ia && ac == 1 { system("cat " variant "-Dockerfile-block-" ab) }
' "$version/$suite/$variant/Dockerfile"
cp -a \
docker-php-entrypoint \
docker-php-ext-* \
docker-php-source \
"$version/$suite/$variant/"
if [ "$variant" = 'apache' ]; then
cp -a apache2-foreground "$version/$suite/$variant/"
fi
if [ "$majorVersion" = '7' -a "$minorVersion" -lt '2' ]; then
# argon2 password hashing is only supported in 7.2+
sed -ri \
-e '/##<argon2-stretch>##/,/##<\/argon2-stretch>##/d' \
-e '/argon2/d' \
"$version/$suite/$variant/Dockerfile"
elif [ "$suite" != 'stretch' ]; then
# and buster+ doesn't need to pull argon2 from stretch-backports
sed -ri \
-e '/##<argon2-stretch>##/,/##<\/argon2-stretch>##/d' \
"$version/$suite/$variant/Dockerfile"
fi
if [ "$majorVersion" = '7' -a "$minorVersion" -lt '4' ]; then
# oniguruma is part of mbstring in php 7.4+
sed -ri \
-e '/oniguruma-dev|libonig-dev/d' \
"$version/$suite/$variant/Dockerfile"
fi
if [ "$majorVersion" -ge '8' ]; then
# 8 and above no longer include pecl/pear (see https://github.com/docker-library/php/issues/846#issuecomment-505638494)
sed -ri \
-e '/pear |pearrc|pecl.*channel/d' \
"$version/$suite/$variant/Dockerfile"
fi
if [ "$majorVersion" != '7' ] || [ "$minorVersion" -lt '4' ]; then
# --with-pear is only relevant on PHP 7, and specifically only 7.4+ (see https://github.com/docker-library/php/issues/846#issuecomment-505638494)
sed -ri \
-e '/--with-pear/d' \
"$version/$suite/$variant/Dockerfile"
fi
if [ "$majorVersion" = '7' -a "$minorVersion" -lt '2' ]; then
# sodium is part of php core 7.2+ https://wiki.php.net/rfc/libsodium
sed -ri '/sodium/d' "$version/$suite/$variant/Dockerfile"
fi
if [ "$variant" = 'fpm' -a "$majorVersion" = '7' -a "$minorVersion" -lt '3' ]; then
# php-fpm "decorate_workers_output" is only available in 7.3+
sed -ri \
-e '/decorate_workers_output/d' \
-e '/log_limit/d' \
"$version/$suite/$variant/Dockerfile"
fi
if [ "$suite" = 'stretch' ] || [ "$majorVersion" -gt '7' ] || { [ "$majorVersion" = '7' ] && [ "$minorVersion" -ge '4' ]; }; then
# https://github.com/docker-library/php/issues/865
# https://bugs.php.net/bug.php?id=76324
# https://github.com/php/php-src/pull/3632
# https://github.com/php/php-src/commit/2d03197749696ac3f8effba6b7977b0d8729fef3
sed -ri \
-e '/freetype-config/d' \
"$version/$suite/$variant/Dockerfile"
fi
if [[ "$suite" == alpine* ]] && [ "$majorVersion" = '7' ] && [ "$minorVersion" -lt '4' ]; then
# https://github.com/docker-library/php/issues/888
sed -ri \
-e '/linux-headers/d' \
"$version/$suite/$variant/Dockerfile"
fi
if [ "$majorVersion" -lt '8' ]; then
# https://github.com/php/php-src/commit/161adfff3f437bf9370e037a9e2bf593c784ccff
sed -ri \
-e 's/--enable-zts/--enable-maintainer-zts/g' \
"$version/$suite/$variant/Dockerfile"
fi
# remove any _extra_ blank lines created by the deletions above
gawk '
{
if (NF == 0 || (NF == 1 && $1 == "\\")) {
blank++
}
else {
blank = 0
}
if (blank < 2) {
print
}
}
' "$version/$suite/$variant/Dockerfile" > "$version/$suite/$variant/Dockerfile.new"
mv "$version/$suite/$variant/Dockerfile.new" "$version/$suite/$variant/Dockerfile"
sed -ri \
-e 's!%%DEBIAN_TAG%%!'"$suite-slim"'!' \
-e 's!%%DEBIAN_SUITE%%!'"$suite"'!' \
-e 's!%%ALPINE_VERSION%%!'"$alpineVer"'!' \
"$version/$suite/$variant/Dockerfile"
dockerfiles+=( "$version/$suite/$variant/Dockerfile" )
done
done
(
set -x
sed -ri \
-e 's!%%PHP_VERSION%%!'"$fullVersion"'!' \
-e 's!%%GPG_KEYS%%!'"$gpgKey"'!' \
-e 's!%%PHP_URL%%!'"$url"'!' \
-e 's!%%PHP_ASC_URL%%!'"$ascUrl"'!' \
-e 's!%%PHP_SHA256%%!'"$sha256"'!' \
-e 's!%%PHP_MD5%%!'"$md5"'!' \
"${dockerfiles[@]}"
)
# update entrypoint commands
for dockerfile in "${dockerfiles[@]}"; do
cmd="$(awk '$1 == "CMD" { $1 = ""; print }' "$dockerfile" | tail -1 | jq --raw-output '.[0]')"
entrypoint="$(dirname "$dockerfile")/docker-php-entrypoint"
sed -i 's! php ! '"$cmd"' !g' "$entrypoint"
done
done
./versions.sh "$@"
./apply-templates.sh "$@"

11
version-id.jq Normal file
View File

@ -0,0 +1,11 @@
def version_id:
# https://www.php.net/phpversion
# $version_id = $major_version * 10000 + $minor_version * 100 + $release_version;
sub("[a-z].*$"; "")
| split(".")
| (
(.[0] // 0 | tonumber) * 10000
+ (.[1] // 0 | tonumber) * 100
+ (.[2] // 0 | tonumber)
)
;

82
versions.json Normal file
View File

@ -0,0 +1,82 @@
{
"7.2": {
"ascUrl": "https://www.php.net/distributions/php-7.2.33.tar.xz.asc",
"gpgKeys": "1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F",
"sha256": "0f160a3483ffce36be5962fab7bcf09d605ee66c5707df83e4195cb796bbb03a",
"url": "https://www.php.net/distributions/php-7.2.33.tar.xz",
"variants": [
"buster/cli",
"buster/apache",
"buster/fpm",
"buster/zts",
"stretch/cli",
"stretch/apache",
"stretch/fpm",
"stretch/zts",
"alpine3.12/cli",
"alpine3.12/fpm",
"alpine3.12/zts",
"alpine3.11/cli",
"alpine3.11/fpm",
"alpine3.11/zts"
],
"version": "7.2.33"
},
"7.3": {
"ascUrl": "https://www.php.net/distributions/php-7.3.21.tar.xz.asc",
"gpgKeys": "CBAF69F173A0FEA4B537F470D66C9593118BCCB6 F38252826ACD957EF380D39F2F7956BC5DA04B5D",
"sha256": "4c8b065746ef776d84b7ae47908c21a79e3d4704b86b60d816716b8697c58ce9",
"url": "https://www.php.net/distributions/php-7.3.21.tar.xz",
"variants": [
"buster/cli",
"buster/apache",
"buster/fpm",
"buster/zts",
"stretch/cli",
"stretch/apache",
"stretch/fpm",
"stretch/zts",
"alpine3.12/cli",
"alpine3.12/fpm",
"alpine3.12/zts",
"alpine3.11/cli",
"alpine3.11/fpm",
"alpine3.11/zts"
],
"version": "7.3.21"
},
"7.4": {
"ascUrl": "https://www.php.net/distributions/php-7.4.9.tar.xz.asc",
"gpgKeys": "42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312",
"sha256": "23733f4a608ad1bebdcecf0138ebc5fd57cf20d6e0915f98a9444c3f747dc57b",
"url": "https://www.php.net/distributions/php-7.4.9.tar.xz",
"variants": [
"buster/cli",
"buster/apache",
"buster/fpm",
"buster/zts",
"alpine3.12/cli",
"alpine3.12/fpm",
"alpine3.12/zts",
"alpine3.11/cli",
"alpine3.11/fpm",
"alpine3.11/zts"
],
"version": "7.4.9"
},
"8.0-rc": {
"ascUrl": "https://downloads.php.net/~pollita/php-8.0.0beta2.tar.xz.asc",
"gpgKeys": "1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F",
"sha256": "466b2519f54e819bc8907206b30e0e21196a3609e80f27a112c434c7ede3a965",
"url": "https://downloads.php.net/~pollita/php-8.0.0beta2.tar.xz",
"variants": [
"buster/cli",
"buster/apache",
"buster/fpm",
"buster/zts",
"alpine3.12/cli",
"alpine3.12/fpm"
],
"version": "8.0.0beta2"
}
}

144
versions.sh Executable file
View File

@ -0,0 +1,144 @@
#!/usr/bin/env bash
set -Eeuo pipefail
# https://www.php.net/gpg-keys.php
declare -A gpgKeys=(
# https://wiki.php.net/todo/php80
# pollita & carusogabriel
# https://www.php.net/gpg-keys.php#gpg-8.0
[8.0]='1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F'
# https://wiki.php.net/todo/php74
# petk & derick
# https://www.php.net/gpg-keys.php#gpg-7.4
[7.4]='42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312'
# https://wiki.php.net/todo/php73
# cmb & stas
# https://www.php.net/gpg-keys.php#gpg-7.3
[7.3]='CBAF69F173A0FEA4B537F470D66C9593118BCCB6 F38252826ACD957EF380D39F2F7956BC5DA04B5D'
# https://wiki.php.net/todo/php72
# pollita & remi
# https://www.php.net/downloads.php#gpg-7.2
# https://www.php.net/gpg-keys.php#gpg-7.2
[7.2]='1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F'
[7.1]='foo'
)
# see https://www.php.net/downloads.php
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
versions=( "$@" )
if [ ${#versions[@]} -eq 0 ]; then
versions=( */ )
json='{}'
else
json="$(< versions.json)"
fi
versions=( "${versions[@]%/}" )
for version in "${versions[@]}"; do
rcVersion="${version%-rc}"
export version rcVersion
# scrape the relevant API based on whether we're looking for pre-releases
if [ "$rcVersion" = "$version" ]; then
apiUrl="https://www.php.net/releases/index.php?json&max=100&version=${rcVersion%%.*}"
apiJqExpr='
(keys[] | select(startswith(env.rcVersion))) as $version
| [ $version, (
.[$version].source[]
| select(.filename | endswith(".xz"))
|
"https://www.php.net/distributions/" + .filename,
"https://www.php.net/distributions/" + .filename + ".asc",
.sha256 // "",
.md5 // ""
) ]
'
else
apiUrl='https://qa.php.net/api.php?type=qa-releases&format=json'
apiJqExpr='
.releases[]
| select(.version | startswith(env.rcVersion))
| [
.version,
.files.xz.path // "",
"",
.files.xz.sha256 // "",
.files.xz.md5 // ""
]
'
fi
IFS=$'\n'
possibles=( $(
curl -fsSL "$apiUrl" \
| jq --raw-output "$apiJqExpr | @sh" \
| sort -rV
) )
unset IFS
if [ "${#possibles[@]}" -eq 0 ]; then
echo >&2
echo >&2 "error: unable to determine available releases of $version"
echo >&2
exit 1
fi
# format of "possibles" array entries is "VERSION URL.TAR.XZ URL.TAR.XZ.ASC SHA256 MD5" (each value shell quoted)
# see the "apiJqExpr" values above for more details
eval "possi=( ${possibles[0]} )"
fullVersion="${possi[0]}"
url="${possi[1]}"
ascUrl="${possi[2]}"
sha256="${possi[3]}"
md5="${possi[4]}"
gpgKey="${gpgKeys[$rcVersion]:-}"
if [ -z "$gpgKey" ]; then
echo >&2 "ERROR: missing GPG key fingerprint for $version"
echo >&2 " try looking on https://www.php.net/downloads.php#gpg-$version"
echo >&2 " (and update 'gpgKeys' array in '$BASH_SOURCE')"
exit 1
fi
# if we don't have a .asc URL, let's see if we can figure one out :)
if [ -z "$ascUrl" ] && wget -q --spider "$url.asc"; then
ascUrl="$url.asc"
fi
variants='[]'
# order here controls the order of the library/ file
for suite in \
buster \
stretch \
alpine3.12 \
alpine3.11 \
; do
for variant in cli apache fpm zts; do
[ -d "$version/$suite/$variant" ] || continue
export suite variant
variants="$(jq <<<"$variants" -c '. + [ env.suite + "/" + env.variant ]')"
done
done
echo "$version: $fullVersion"
export fullVersion url ascUrl sha256 md5 gpgKey
json="$(
jq <<<"$json" -c \
--argjson variants "$variants" \
'.[env.version] = {
version: env.fullVersion,
url: env.url,
ascUrl: env.ascUrl,
sha256: env.sha256,
gpgKeys: env.gpgKey,
variants: $variants,
}'
)"
done
jq <<<"$json" -S . > versions.json

View File

@ -1 +0,0 @@
ENV PHP_EXTRA_CONFIGURE_ARGS --enable-zts --disable-cgi