diff --git a/Dockerfiles/base/Dockerfile-5.2 b/Dockerfiles/base/Dockerfile-5.2 index 55e6e595..c86f1811 100644 --- a/Dockerfiles/base/Dockerfile-5.2 +++ b/Dockerfiles/base/Dockerfile-5.2 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index ff1a990a..e68979a1 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index 50580958..66cc86a9 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index 79efd6ef..12a52bec 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index ef08f801..6dd75690 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index 9d37c2b7..e659a662 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index 4e354e50..131247a1 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index a5aa1b6f..934fc038 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index 9d2f474b..a502e2e5 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -36,9 +36,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -68,10 +67,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 index 37b75739..55467f25 100644 --- a/Dockerfiles/mods/Dockerfile-5.2 +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -18,85 +18,61 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ - librabbitmq-dev \ + firebird-dev \ + freetds-dev \ libbz2-dev \ - libcurl4-openssl-dev \ - libxml2-dev \ - libenchant-dev \ - libmagic-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ - libfreetype6-dev \ libc-client-dev \ - libkrb5-dev \ libcurl4-openssl-dev \ + libenchant-dev \ libfbclient2 \ + libfreetype6-dev \ libib-util \ - firebird-dev \ libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagic-dev \ libmcrypt-dev \ - zlib1g-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libpng-dev \ libpq-dev \ - libssl-dev \ libpspell-dev \ + librabbitmq-dev \ librecode-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ + libssl-dev \ libtidy-dev \ + libvpx-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ + snmp \ zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - librabbitmq1 \ - libenchant1c2a \ - libpng12-0 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx1 \ - libfreetype6 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ libicu52 \ + libjpeg62-turbo \ libmcrypt4 \ libmemcachedutil2 \ libmysqlclient18 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libpng12-0 \ libpq5 \ - libaspell15 \ + librabbitmq1 \ librecode0 \ - snmp \ + libsybdb5 \ libtidy-0.99-0 \ + libvpx1 \ + libxpm4 \ libxslt1.1 \ + snmp \ ca-certificates @@ -104,8 +80,9 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ @@ -119,23 +96,75 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ + \ + && rm -rf /usr/local/lib/php/test/ioncube || true \ + && rm -rf /usr/local/lib/php/doc/ioncube || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install amqp-1.4.0 \ && docker-php-ext-enable amqp \ + \ + && rm -rf /usr/local/lib/php/test/amqp || true \ + && rm -rf /usr/local/lib/php/doc/amqp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && echo "/usr" | pecl install enchant \ && docker-php-ext-enable enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install fileinfo \ && docker-php-ext-enable fileinfo \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libjpeg.* /usr/lib/ && \ ln -s /usr/lib/x86_64-linux-gnu/libpng.* /usr/lib/ && \ ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && \ @@ -144,107 +173,318 @@ ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ - && pecl install igbinary \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && pecl install igbinary-2.0.7 \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install intl \ && docker-php-ext-enable intl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcache \ && docker-php-ext-enable memcache \ + \ + && rm -rf /usr/local/lib/php/test/memcache || true \ + && rm -rf /usr/local/lib/php/doc/memcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcached-2.1.0 \ && docker-php-ext-enable memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && yes | pecl install mongo-1.5.8 \ && docker-php-ext-enable mongo \ + \ + && rm -rf /usr/local/lib/php/test/mongo || true \ + && rm -rf /usr/local/lib/php/doc/mongo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install msgpack-0.5.7 \ && docker-php-ext-enable msgpack \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + \ + && rm -rf /usr/local/lib/php/test/msgpack || true \ + && rm -rf /usr/local/lib/php/doc/msgpack || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysql || true \ + && rm -rf /usr/local/lib/php/doc/mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install zendopcache \ && docker-php-ext-enable opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ - && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install phar \ && docker-php-ext-enable phar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + \ + && rm -rf /usr/local/lib/php/test/phar || true \ + && rm -rf /usr/local/lib/php/doc/phar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/readline || true \ + && rm -rf /usr/local/lib/php/doc/readline || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis-2.2.7 \ && docker-php-ext-enable redis \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ - && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install uploadprogress \ && docker-php-ext-enable uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install xdebug-2.2.7 \ && docker-php-ext-enable xdebug \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ - && /usr/local/bin/docker-php-ext-configure xmlreader --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlreader \ + \ + && rm -rf /usr/local/lib/php/test/xdebug || true \ + && rm -rf /usr/local/lib/php/doc/xdebug || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^bcmath$' \ @@ -267,6 +507,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -289,6 +531,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ @@ -307,8 +551,12 @@ RUN set -x \ && php-fpm -m | grep -oiE '^mysqli$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ && php -m | grep -oiE '^pdo$' \ && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ @@ -329,6 +577,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^posix$' \ && php -m | grep -oiE '^pspell$' \ && php-fpm -m | grep -oiE '^pspell$' \ + && php -m | grep -oiE '^readline$' \ + && php-fpm -m | grep -oiE '^readline$' \ && php -m | grep -oiE '^recode$' \ && php-fpm -m | grep -oiE '^recode$' \ && php -m | grep -oiE '^redis$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index 4de0b522..8ce39271 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -18,94 +18,66 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ - librabbitmq-dev \ + firebird-dev \ + freetds-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ - libxml2-dev \ libenchant-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ + libfbclient2 \ libfreetype6-dev \ libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libkrb5-dev \ - libcurl4-openssl-dev \ - libfbclient2 \ libib-util \ - firebird-dev \ libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagickwand-dev \ libmcrypt-dev \ - zlib1g-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libnghttp2-dev \ + libpng-dev \ libpq-dev \ - libssl-dev \ libpspell-dev \ - librecode-dev \ + librabbitmq-dev \ librdkafka-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ - libnghttp2-dev \ libssl-dev \ libtidy-dev \ + libvpx-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ + snmp \ zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - librabbitmq1 \ - libenchant1c2a \ - libpng12-0 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx1 \ - libfreetype6 \ - libmagickwand-6.q16-2 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ libicu52 \ + libjpeg62-turbo \ + libmagickwand-6.q16-2 \ libmcrypt4 \ libmemcachedutil2 \ libmysqlclient18 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libnghttp2-5 \ + libpng12-0 \ libpq5 \ - libaspell15 \ - librecode0 \ + librabbitmq1 \ librdkafka1 \ - snmp \ - libnghttp2-5 \ + librecode0 \ + libsybdb5 \ libtidy-0.99-0 \ + libvpx1 \ + libxpm4 \ libxslt1.1 \ + snmp \ ca-certificates @@ -113,8 +85,9 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ @@ -128,141 +101,434 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ + \ + && rm -rf /usr/local/lib/php/test/ioncube || true \ + && rm -rf /usr/local/lib/php/doc/ioncube || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && echo "/usr" | pecl install amqp \ && docker-php-ext-enable amqp \ + \ + && rm -rf /usr/local/lib/php/test/amqp || true \ + && rm -rf /usr/local/lib/php/doc/amqp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install apcu-4.0.11 \ && docker-php-ext-enable apcu \ + \ + && rm -rf /usr/local/lib/php/test/apcu || true \ + && rm -rf /usr/local/lib/php/doc/apcu || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) fileinfo \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + \ + && rm -rf /usr/local/lib/php/test/gmp || true \ + && rm -rf /usr/local/lib/php/doc/gmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install igbinary \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install imagick-3.3.0 \ && docker-php-ext-enable imagick \ + \ + && rm -rf /usr/local/lib/php/test/imagick || true \ + && rm -rf /usr/local/lib/php/doc/imagick || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcache \ && docker-php-ext-enable memcache \ + \ + && rm -rf /usr/local/lib/php/test/memcache || true \ + && rm -rf /usr/local/lib/php/doc/memcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcached-2.2.0 \ && docker-php-ext-enable memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && yes | pecl install mongo \ && docker-php-ext-enable mongo \ + \ + && rm -rf /usr/local/lib/php/test/mongo || true \ + && rm -rf /usr/local/lib/php/doc/mongo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mongodb-0.6.3 \ && docker-php-ext-enable mongodb \ + \ + && rm -rf /usr/local/lib/php/test/mongodb || true \ + && rm -rf /usr/local/lib/php/doc/mongodb || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install msgpack-0.5.7 \ && docker-php-ext-enable msgpack \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + \ + && rm -rf /usr/local/lib/php/test/msgpack || true \ + && rm -rf /usr/local/lib/php/doc/msgpack || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysql || true \ + && rm -rf /usr/local/lib/php/doc/mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqlnd || true \ + && rm -rf /usr/local/lib/php/doc/mysqlnd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install zendopcache \ && docker-php-ext-enable opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ && git checkout phalcon-v2.0.9 \ && cd build && ./install \ && docker-php-ext-enable phalcon \ - && cd / && rm -rf /tmp/phalcon \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) phar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + \ + && rm -rf /usr/local/lib/php/test/phalcon || true \ + && rm -rf /usr/local/lib/php/doc/phalcon || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/phar || true \ + && rm -rf /usr/local/lib/php/doc/phar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis \ && docker-php-ext-enable redis \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install rdkafka \ && docker-php-ext-enable rdkafka \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + \ + && rm -rf /usr/local/lib/php/test/rdkafka || true \ + && rm -rf /usr/local/lib/php/doc/rdkafka || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install swoole-1.9.23 \ && docker-php-ext-enable swoole \ + \ + && rm -rf /usr/local/lib/php/test/swoole || true \ + && rm -rf /usr/local/lib/php/doc/swoole || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install uploadprogress \ && docker-php-ext-enable uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install xdebug-2.2.7 \ && docker-php-ext-enable xdebug \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ - && /usr/local/bin/docker-php-ext-configure xmlreader --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlreader \ + \ + && rm -rf /usr/local/lib/php/test/xdebug || true \ + && rm -rf /usr/local/lib/php/doc/xdebug || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^apcu$' \ @@ -287,6 +553,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -313,6 +581,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ @@ -331,10 +601,16 @@ RUN set -x \ && php-fpm -m | grep -oiE '^mysql$' \ && php -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ && php -m | grep -oiE '^pdo$' \ && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index bc0f7c7c..ecf69ec2 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -18,94 +18,66 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ - librabbitmq-dev \ + firebird-dev \ + freetds-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ - libxml2-dev \ libenchant-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ + libfbclient2 \ libfreetype6-dev \ libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libkrb5-dev \ - libcurl4-openssl-dev \ - libfbclient2 \ libib-util \ - firebird-dev \ libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagickwand-dev \ libmcrypt-dev \ - zlib1g-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libnghttp2-dev \ + libpng-dev \ libpq-dev \ - libssl-dev \ libpspell-dev \ - librecode-dev \ + librabbitmq-dev \ librdkafka-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ - libnghttp2-dev \ libssl-dev \ libtidy-dev \ + libvpx-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ + snmp \ zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - librabbitmq1 \ - libenchant1c2a \ - libpng12-0 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx1 \ - libfreetype6 \ - libmagickwand-6.q16-2 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ libicu52 \ + libjpeg62-turbo \ + libmagickwand-6.q16-2 \ libmcrypt4 \ libmemcachedutil2 \ libmysqlclient18 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libnghttp2-5 \ + libpng12-0 \ libpq5 \ - libaspell15 \ - librecode0 \ + librabbitmq1 \ librdkafka1 \ - snmp \ - libnghttp2-5 \ + librecode0 \ + libsybdb5 \ libtidy-0.99-0 \ + libvpx1 \ + libxpm4 \ libxslt1.1 \ + snmp \ ca-certificates @@ -113,8 +85,9 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ @@ -128,141 +101,439 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ + \ + && rm -rf /usr/local/lib/php/test/ioncube || true \ + && rm -rf /usr/local/lib/php/doc/ioncube || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && echo "/usr" | pecl install amqp \ && docker-php-ext-enable amqp \ + \ + && rm -rf /usr/local/lib/php/test/amqp || true \ + && rm -rf /usr/local/lib/php/doc/amqp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install apcu-4.0.11 \ && docker-php-ext-enable apcu \ + \ + && rm -rf /usr/local/lib/php/test/apcu || true \ + && rm -rf /usr/local/lib/php/doc/apcu || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install calendar \ - && /usr/local/bin/docker-php-ext-install ctype \ - && /usr/local/bin/docker-php-ext-install curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install exif \ - && /usr/local/bin/docker-php-ext-install fileinfo \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install ftp \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ && /usr/local/bin/docker-php-ext-install gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install gettext \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ && /usr/local/bin/docker-php-ext-install gmp \ - && /usr/local/bin/docker-php-ext-install hash \ - && /usr/local/bin/docker-php-ext-install iconv \ + \ + && rm -rf /usr/local/lib/php/test/gmp || true \ + && rm -rf /usr/local/lib/php/doc/gmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install igbinary \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install imagick \ && docker-php-ext-enable imagick \ + \ + && rm -rf /usr/local/lib/php/test/imagick || true \ + && rm -rf /usr/local/lib/php/doc/imagick || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install intl \ - && /usr/local/bin/docker-php-ext-install json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install ldap \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install mbstring \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcache \ && docker-php-ext-enable memcache \ + \ + && rm -rf /usr/local/lib/php/test/memcache || true \ + && rm -rf /usr/local/lib/php/doc/memcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcached-2.2.0 \ && docker-php-ext-enable memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && yes | pecl install mongo \ && docker-php-ext-enable mongo \ + \ + && rm -rf /usr/local/lib/php/test/mongo || true \ + && rm -rf /usr/local/lib/php/doc/mongo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mongodb-1.2.11 \ && docker-php-ext-enable mongodb \ + \ + && rm -rf /usr/local/lib/php/test/mongodb || true \ + && rm -rf /usr/local/lib/php/doc/mongodb || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install msgpack-0.5.7 \ && docker-php-ext-enable msgpack \ + \ + && rm -rf /usr/local/lib/php/test/msgpack || true \ + && rm -rf /usr/local/lib/php/doc/msgpack || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install mysql \ + \ + && rm -rf /usr/local/lib/php/test/mysql || true \ + && rm -rf /usr/local/lib/php/doc/mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install mysqli \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqlnd || true \ + && rm -rf /usr/local/lib/php/doc/mysqlnd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install zendopcache \ && docker-php-ext-enable opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install pcntl \ - && /usr/local/bin/docker-php-ext-install pdo \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install pdo_firebird \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && /usr/local/bin/docker-php-ext-install pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install pgsql \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ && git checkout phalcon-v2.0.13 \ && cd build && ./install \ && docker-php-ext-enable phalcon \ - && cd / && rm -rf /tmp/phalcon \ - && /usr/local/bin/docker-php-ext-install phar \ - && /usr/local/bin/docker-php-ext-install posix \ + \ + && rm -rf /usr/local/lib/php/test/phalcon || true \ + && rm -rf /usr/local/lib/php/doc/phalcon || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/phar || true \ + && rm -rf /usr/local/lib/php/doc/phar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install pspell \ - && /usr/local/bin/docker-php-ext-install recode \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/readline || true \ + && rm -rf /usr/local/lib/php/doc/readline || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis \ && docker-php-ext-enable redis \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install rdkafka \ && docker-php-ext-enable rdkafka \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install session \ + \ + && rm -rf /usr/local/lib/php/test/rdkafka || true \ + && rm -rf /usr/local/lib/php/doc/rdkafka || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install snmp \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install soap \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install sockets \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install swoole-1.9.23 \ && docker-php-ext-enable swoole \ + \ + && rm -rf /usr/local/lib/php/test/swoole || true \ + && rm -rf /usr/local/lib/php/doc/swoole || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install tidy \ - && /usr/local/bin/docker-php-ext-install tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install uploadprogress \ && docker-php-ext-enable uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install wddx \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install xdebug-2.4.1 \ && docker-php-ext-enable xdebug \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install xml \ - && /usr/local/bin/docker-php-ext-configure xmlreader --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install xmlreader \ + \ + && rm -rf /usr/local/lib/php/test/xdebug || true \ + && rm -rf /usr/local/lib/php/doc/xdebug || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ && /usr/local/bin/docker-php-ext-install zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^apcu$' \ @@ -287,6 +558,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -313,6 +586,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ @@ -331,10 +606,16 @@ RUN set -x \ && php-fpm -m | grep -oiE '^mysql$' \ && php -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ && php -m | grep -oiE '^pdo$' \ && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ @@ -357,6 +638,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^posix$' \ && php -m | grep -oiE '^pspell$' \ && php-fpm -m | grep -oiE '^pspell$' \ + && php -m | grep -oiE '^readline$' \ + && php-fpm -m | grep -oiE '^readline$' \ && php -m | grep -oiE '^recode$' \ && php-fpm -m | grep -oiE '^recode$' \ && php -m | grep -oiE '^redis$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index 5405f085..51d7b9b3 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -18,96 +18,67 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ - librabbitmq-dev \ + firebird-dev \ + freetds-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ - libxml2-dev \ libenchant-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ + libfbclient2 \ libfreetype6-dev \ libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libkrb5-dev \ - libcurl4-openssl-dev \ - libfbclient2 \ libib-util \ - firebird-dev \ libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagickwand-dev \ libmcrypt-dev \ - zlib1g-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libnghttp2-dev \ + libpng-dev \ libpq-dev \ - libssl-dev \ libpspell-dev \ - libedit-dev \ - libreadline-dev \ - librecode-dev \ + librabbitmq-dev \ librdkafka-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + librecode-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ - libnghttp2-dev \ libssl-dev \ libtidy-dev \ + libvpx-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ + snmp \ zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - librabbitmq1 \ - libenchant1c2a \ - libpng12-0 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx1 \ - libfreetype6 \ - libmagickwand-6.q16-2 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ libicu52 \ + libjpeg62-turbo \ + libmagickwand-6.q16-2 \ libmcrypt4 \ libmemcachedutil2 \ libmysqlclient18 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libnghttp2-5 \ + libpng12-0 \ libpq5 \ - libaspell15 \ - librecode0 \ + librabbitmq1 \ librdkafka1 \ - snmp \ - libnghttp2-5 \ + librecode0 \ + libsybdb5 \ libtidy-0.99-0 \ + libvpx1 \ + libxpm4 \ libxslt1.1 \ + snmp \ ca-certificates @@ -115,8 +86,9 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ @@ -130,141 +102,436 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ + \ + && rm -rf /usr/local/lib/php/test/ioncube || true \ + && rm -rf /usr/local/lib/php/doc/ioncube || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && echo "/usr" | pecl install amqp \ && docker-php-ext-enable amqp \ + \ + && rm -rf /usr/local/lib/php/test/amqp || true \ + && rm -rf /usr/local/lib/php/doc/amqp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install apcu-4.0.11 \ && docker-php-ext-enable apcu \ + \ + && rm -rf /usr/local/lib/php/test/apcu || true \ + && rm -rf /usr/local/lib/php/doc/apcu || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) fileinfo \ - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + \ + && rm -rf /usr/local/lib/php/test/gmp || true \ + && rm -rf /usr/local/lib/php/doc/gmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install igbinary \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install imagick \ && docker-php-ext-enable imagick \ + \ + && rm -rf /usr/local/lib/php/test/imagick || true \ + && rm -rf /usr/local/lib/php/doc/imagick || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcache \ && docker-php-ext-enable memcache \ + \ + && rm -rf /usr/local/lib/php/test/memcache || true \ + && rm -rf /usr/local/lib/php/doc/memcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcached-2.2.0 \ && docker-php-ext-enable memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && yes | pecl install mongo \ && docker-php-ext-enable mongo \ + \ + && rm -rf /usr/local/lib/php/test/mongo || true \ + && rm -rf /usr/local/lib/php/doc/mongo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mongodb \ && docker-php-ext-enable mongodb \ + \ + && rm -rf /usr/local/lib/php/test/mongodb || true \ + && rm -rf /usr/local/lib/php/doc/mongodb || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install msgpack-0.5.7 \ && docker-php-ext-enable msgpack \ + \ + && rm -rf /usr/local/lib/php/test/msgpack || true \ + && rm -rf /usr/local/lib/php/doc/msgpack || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + \ + && rm -rf /usr/local/lib/php/test/mysql || true \ + && rm -rf /usr/local/lib/php/doc/mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqlnd || true \ + && rm -rf /usr/local/lib/php/doc/mysqlnd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ && cd build && ./install \ && docker-php-ext-enable phalcon \ - && cd / && rm -rf /tmp/phalcon \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) phar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + \ + && rm -rf /usr/local/lib/php/test/phalcon || true \ + && rm -rf /usr/local/lib/php/doc/phalcon || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/phar || true \ + && rm -rf /usr/local/lib/php/doc/phar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) readline \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/readline || true \ + && rm -rf /usr/local/lib/php/doc/readline || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis \ && docker-php-ext-enable redis \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install rdkafka \ && docker-php-ext-enable rdkafka \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + \ + && rm -rf /usr/local/lib/php/test/rdkafka || true \ + && rm -rf /usr/local/lib/php/doc/rdkafka || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install swoole-1.9.23 \ && docker-php-ext-enable swoole \ + \ + && rm -rf /usr/local/lib/php/test/swoole || true \ + && rm -rf /usr/local/lib/php/doc/swoole || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install uploadprogress \ && docker-php-ext-enable uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install xdebug-2.4.1 \ && docker-php-ext-enable xdebug \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ - && /usr/local/bin/docker-php-ext-configure xmlreader --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlreader \ + \ + && rm -rf /usr/local/lib/php/test/xdebug || true \ + && rm -rf /usr/local/lib/php/doc/xdebug || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^apcu$' \ @@ -289,6 +556,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -315,6 +584,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ @@ -333,10 +604,16 @@ RUN set -x \ && php-fpm -m | grep -oiE '^mysql$' \ && php -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ && php -m | grep -oiE '^pdo$' \ && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index 188017aa..0e6aeb7d 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -18,99 +18,71 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ - librabbitmq-dev \ + firebird-dev \ + freetds-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ - libxml2-dev \ libenchant-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ + libfbclient2 \ libfreetype6-dev \ - libwebp-dev \ libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libkrb5-dev \ - libcurl4-openssl-dev \ - libfbclient2 \ libib-util \ - firebird-dev \ libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagickwand-dev \ libmcrypt-dev \ - zlib1g-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libnghttp2-dev \ + libpng-dev \ libpq-dev \ libpspell-dev \ - libedit-dev \ - libreadline-dev \ - librecode-dev \ + librabbitmq-dev \ librdkafka-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + librecode-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ - libnghttp2-dev \ libssl-dev \ libtidy-dev \ + libvpx-dev \ + libwebp-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ - zlib1g-dev \ libzip-dev \ + snmp \ + zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - librabbitmq4 \ - libenchant1c2a \ - libpng16-16 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx4 \ - libfreetype6 \ - libwebp6 \ - libmagickwand-6.q16-3 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ libicu57 \ + libjpeg62-turbo \ + libmagickwand-6.q16-3 \ + libmariadbclient18 \ libmcrypt4 \ libmemcachedutil2 \ - libmariadbclient18 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libnghttp2-14 \ + libpng16-16 \ libpq5 \ - libaspell15 \ - librecode0 \ + librabbitmq4 \ librdkafka1 \ - snmp \ - libnghttp2-14 \ + librecode0 \ + libsybdb5 \ libtidy5 \ + libvpx4 \ + libwebp6 \ + libxpm4 \ libxslt1.1 \ libzip4 \ + snmp \ ca-certificates @@ -118,8 +90,9 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ @@ -133,140 +106,432 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ + \ + && rm -rf /usr/local/lib/php/test/ioncube || true \ + && rm -rf /usr/local/lib/php/doc/ioncube || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && echo "/usr" | pecl install amqp \ && docker-php-ext-enable amqp \ + \ + && rm -rf /usr/local/lib/php/test/amqp || true \ + && rm -rf /usr/local/lib/php/doc/amqp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install apcu-4.0.11 \ && docker-php-ext-enable apcu \ + \ + && rm -rf /usr/local/lib/php/test/apcu || true \ + && rm -rf /usr/local/lib/php/doc/apcu || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) fileinfo \ - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + \ + && rm -rf /usr/local/lib/php/test/gmp || true \ + && rm -rf /usr/local/lib/php/doc/gmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install igbinary \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install imagick \ && docker-php-ext-enable imagick \ + \ + && rm -rf /usr/local/lib/php/test/imagick || true \ + && rm -rf /usr/local/lib/php/doc/imagick || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcache \ && docker-php-ext-enable memcache \ + \ + && rm -rf /usr/local/lib/php/test/memcache || true \ + && rm -rf /usr/local/lib/php/doc/memcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcached-2.2.0 \ && docker-php-ext-enable memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && yes | pecl install mongo \ && docker-php-ext-enable mongo \ + \ + && rm -rf /usr/local/lib/php/test/mongo || true \ + && rm -rf /usr/local/lib/php/doc/mongo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mongodb \ && docker-php-ext-enable mongodb \ + \ + && rm -rf /usr/local/lib/php/test/mongodb || true \ + && rm -rf /usr/local/lib/php/doc/mongodb || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install msgpack-0.5.7 \ && docker-php-ext-enable msgpack \ + \ + && rm -rf /usr/local/lib/php/test/msgpack || true \ + && rm -rf /usr/local/lib/php/doc/msgpack || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + \ + && rm -rf /usr/local/lib/php/test/mysql || true \ + && rm -rf /usr/local/lib/php/doc/mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqlnd || true \ + && rm -rf /usr/local/lib/php/doc/mysqlnd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ && cd build && ./install \ && docker-php-ext-enable phalcon \ - && cd / && rm -rf /tmp/phalcon \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + \ + && rm -rf /usr/local/lib/php/test/phalcon || true \ + && rm -rf /usr/local/lib/php/doc/phalcon || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) readline \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/readline || true \ + && rm -rf /usr/local/lib/php/doc/readline || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis \ && docker-php-ext-enable redis \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install rdkafka \ && docker-php-ext-enable rdkafka \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + \ + && rm -rf /usr/local/lib/php/test/rdkafka || true \ + && rm -rf /usr/local/lib/php/doc/rdkafka || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install swoole-1.9.23 \ && docker-php-ext-enable swoole \ + \ + && rm -rf /usr/local/lib/php/test/swoole || true \ + && rm -rf /usr/local/lib/php/doc/swoole || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install uploadprogress \ && docker-php-ext-enable uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install xdebug-2.4.1 \ && docker-php-ext-enable xdebug \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ - && /usr/local/bin/docker-php-ext-configure xmlreader --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlreader \ + \ + && rm -rf /usr/local/lib/php/test/xdebug || true \ + && rm -rf /usr/local/lib/php/doc/xdebug || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^apcu$' \ @@ -291,6 +556,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -317,6 +584,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ @@ -335,10 +604,16 @@ RUN set -x \ && php-fpm -m | grep -oiE '^mysql$' \ && php -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ && php -m | grep -oiE '^pdo$' \ && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index f4001b5a..34d102c4 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -18,96 +18,70 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ - librabbitmq-dev \ + firebird-dev \ + freetds-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ - libxml2-dev \ libenchant-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ + libfbclient2 \ libfreetype6-dev \ - libwebp-dev \ libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libkrb5-dev \ - libcurl4-openssl-dev \ - libfbclient2 \ libib-util \ - firebird-dev \ libicu-dev \ - bison \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagickwand-dev \ libmcrypt-dev \ - zlib1g-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libnghttp2-dev \ + libpng-dev \ libpq-dev \ libpspell-dev \ - libedit-dev \ - libreadline-dev \ - librecode-dev \ + librabbitmq-dev \ librdkafka-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + librecode-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ - libnghttp2-dev \ libssl-dev \ libtidy-dev \ + libvpx-dev \ + libwebp-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ - zlib1g-dev \ libzip-dev \ + snmp \ + zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - librabbitmq4 \ - libenchant1c2a \ - libpng16-16 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx4 \ - libfreetype6 \ - libwebp6 \ - libmagickwand-6.q16-3 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ libicu57 \ + libjpeg62-turbo \ + libmagickwand-6.q16-3 \ libmcrypt4 \ libmemcachedutil2 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libnghttp2-14 \ + libpng16-16 \ libpq5 \ - libaspell15 \ - librecode0 \ + librabbitmq4 \ librdkafka1 \ - snmp \ - libnghttp2-14 \ + librecode0 \ + libsybdb5 \ libtidy5 \ + libvpx4 \ + libwebp6 \ + libxpm4 \ libxslt1.1 \ libzip4 \ + snmp \ ca-certificates @@ -115,8 +89,9 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ @@ -130,46 +105,155 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ + \ + && rm -rf /usr/local/lib/php/test/ioncube || true \ + && rm -rf /usr/local/lib/php/doc/ioncube || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && echo "/usr" | pecl install amqp \ && docker-php-ext-enable amqp \ + \ + && rm -rf /usr/local/lib/php/test/amqp || true \ + && rm -rf /usr/local/lib/php/doc/amqp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install apcu \ && docker-php-ext-enable apcu \ + \ + && rm -rf /usr/local/lib/php/test/apcu || true \ + && rm -rf /usr/local/lib/php/doc/apcu || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) fileinfo \ - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + \ + && rm -rf /usr/local/lib/php/test/gmp || true \ + && rm -rf /usr/local/lib/php/doc/gmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install igbinary \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install imagick \ && docker-php-ext-enable imagick \ + \ + && rm -rf /usr/local/lib/php/test/imagick || true \ + && rm -rf /usr/local/lib/php/doc/imagick || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/websupport-sk/pecl-memcache /tmp/memcache \ && cd /tmp/memcache \ && phpize \ @@ -177,55 +261,190 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && docker-php-ext-enable memcache \ - && cd / && rm -rf /tmp/memcache \ + \ + && rm -rf /usr/local/lib/php/test/memcache || true \ + && rm -rf /usr/local/lib/php/doc/memcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcached \ && docker-php-ext-enable memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mongodb \ && docker-php-ext-enable mongodb \ + \ + && rm -rf /usr/local/lib/php/test/mongodb || true \ + && rm -rf /usr/local/lib/php/doc/mongodb || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install msgpack \ && docker-php-ext-enable msgpack \ + \ + && rm -rf /usr/local/lib/php/test/msgpack || true \ + && rm -rf /usr/local/lib/php/doc/msgpack || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqlnd || true \ + && rm -rf /usr/local/lib/php/doc/mysqlnd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ && cd build && ./install \ && docker-php-ext-enable phalcon \ - && cd / && rm -rf /tmp/phalcon \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + \ + && rm -rf /usr/local/lib/php/test/phalcon || true \ + && rm -rf /usr/local/lib/php/doc/phalcon || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) readline \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/readline || true \ + && rm -rf /usr/local/lib/php/doc/readline || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis \ && docker-php-ext-enable redis \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install rdkafka \ && docker-php-ext-enable rdkafka \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + \ + && rm -rf /usr/local/lib/php/test/rdkafka || true \ + && rm -rf /usr/local/lib/php/doc/rdkafka || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install swoole-2.2.0 \ && docker-php-ext-enable swoole \ + \ + && rm -rf /usr/local/lib/php/test/swoole || true \ + && rm -rf /usr/local/lib/php/doc/swoole || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ && cd /tmp/uploadprogress \ && phpize \ @@ -233,43 +452,85 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && docker-php-ext-enable uploadprogress \ - && cd / && rm -rf /tmp/uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install xdebug \ && docker-php-ext-enable xdebug \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ + \ + && rm -rf /usr/local/lib/php/test/xdebug || true \ + && rm -rf /usr/local/lib/php/doc/xdebug || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^apcu$' \ @@ -294,6 +555,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -320,6 +583,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ @@ -334,10 +599,18 @@ RUN set -x \ && php-fpm -m | grep -oiE '^msgpack$' \ && php -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ + && php -m | grep -oiE '^pdo$' \ + && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ && php-fpm -m | grep -oiE '^pdo_dblib$' \ && php -m | grep -oiE '^pdo_firebird$' \ @@ -396,6 +669,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xml$' \ && php-fpm -m | grep -oiE '^xml$' \ + && php -m | grep -oiE '^xmlreader$' \ + && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ && php-fpm -m | grep -oiE '^xmlrpc$' \ && php -m | grep -oiE '^xmlwriter$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index 460b01d1..3d703290 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -18,96 +18,70 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ - librabbitmq-dev \ + firebird-dev \ + freetds-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ - libxml2-dev \ libenchant-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ + libfbclient2 \ libfreetype6-dev \ - libwebp-dev \ libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libkrb5-dev \ - libcurl4-openssl-dev \ - libfbclient2 \ libib-util \ - firebird-dev \ libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagickwand-dev \ libmcrypt-dev \ - zlib1g-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libnghttp2-dev \ + libpng-dev \ libpq-dev \ - libssl-dev \ libpspell-dev \ - libedit-dev \ - libreadline-dev \ - librecode-dev \ + librabbitmq-dev \ librdkafka-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + librecode-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ - libnghttp2-dev \ libssl-dev \ libtidy-dev \ + libvpx-dev \ + libwebp-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ - zlib1g-dev \ libzip-dev \ + snmp \ + zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - librabbitmq4 \ - libenchant1c2a \ - libpng16-16 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx4 \ - libfreetype6 \ - libwebp6 \ - libmagickwand-6.q16-3 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ libicu57 \ + libjpeg62-turbo \ + libmagickwand-6.q16-3 \ libmcrypt4 \ libmemcachedutil2 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libnghttp2-14 \ + libpng16-16 \ libpq5 \ - libaspell15 \ - librecode0 \ + librabbitmq4 \ librdkafka1 \ - snmp \ - libnghttp2-14 \ + librecode0 \ + libsybdb5 \ libtidy5 \ + libvpx4 \ + libwebp6 \ + libxpm4 \ libxslt1.1 \ libzip4 \ + snmp \ ca-certificates @@ -115,8 +89,9 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ @@ -130,46 +105,155 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ + \ + && rm -rf /usr/local/lib/php/test/ioncube || true \ + && rm -rf /usr/local/lib/php/doc/ioncube || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && echo "/usr" | pecl install amqp \ && docker-php-ext-enable amqp \ + \ + && rm -rf /usr/local/lib/php/test/amqp || true \ + && rm -rf /usr/local/lib/php/doc/amqp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install apcu \ && docker-php-ext-enable apcu \ + \ + && rm -rf /usr/local/lib/php/test/apcu || true \ + && rm -rf /usr/local/lib/php/doc/apcu || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) fileinfo \ - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + \ + && rm -rf /usr/local/lib/php/test/gmp || true \ + && rm -rf /usr/local/lib/php/doc/gmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install igbinary \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install imagick \ && docker-php-ext-enable imagick \ + \ + && rm -rf /usr/local/lib/php/test/imagick || true \ + && rm -rf /usr/local/lib/php/doc/imagick || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/websupport-sk/pecl-memcache /tmp/memcache \ && cd /tmp/memcache \ && phpize \ @@ -177,57 +261,193 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && docker-php-ext-enable memcache \ - && cd / && rm -rf /tmp/memcache \ + \ + && rm -rf /usr/local/lib/php/test/memcache || true \ + && rm -rf /usr/local/lib/php/doc/memcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcached \ && docker-php-ext-enable memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mongodb \ && docker-php-ext-enable mongodb \ + \ + && rm -rf /usr/local/lib/php/test/mongodb || true \ + && rm -rf /usr/local/lib/php/doc/mongodb || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install msgpack \ && docker-php-ext-enable msgpack \ + \ + && rm -rf /usr/local/lib/php/test/msgpack || true \ + && rm -rf /usr/local/lib/php/doc/msgpack || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqlnd || true \ + && rm -rf /usr/local/lib/php/doc/mysqlnd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ && cd build && ./install \ && docker-php-ext-enable phalcon \ - && cd / && rm -rf /tmp/phalcon \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) phar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + \ + && rm -rf /usr/local/lib/php/test/phalcon || true \ + && rm -rf /usr/local/lib/php/doc/phalcon || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/phar || true \ + && rm -rf /usr/local/lib/php/doc/phar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) readline \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/readline || true \ + && rm -rf /usr/local/lib/php/doc/readline || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis \ && docker-php-ext-enable redis \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install rdkafka \ && docker-php-ext-enable rdkafka \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + \ + && rm -rf /usr/local/lib/php/test/rdkafka || true \ + && rm -rf /usr/local/lib/php/doc/rdkafka || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install swoole \ && docker-php-ext-enable swoole \ + \ + && rm -rf /usr/local/lib/php/test/swoole || true \ + && rm -rf /usr/local/lib/php/doc/swoole || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ && cd /tmp/uploadprogress \ && phpize \ @@ -235,43 +455,85 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && docker-php-ext-enable uploadprogress \ - && cd / && rm -rf /tmp/uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install xdebug \ && docker-php-ext-enable xdebug \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ + \ + && rm -rf /usr/local/lib/php/test/xdebug || true \ + && rm -rf /usr/local/lib/php/doc/xdebug || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^apcu$' \ @@ -296,6 +558,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -322,6 +586,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ @@ -336,10 +602,16 @@ RUN set -x \ && php-fpm -m | grep -oiE '^msgpack$' \ && php -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ && php -m | grep -oiE '^pdo$' \ && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ @@ -402,6 +674,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xml$' \ && php-fpm -m | grep -oiE '^xml$' \ + && php -m | grep -oiE '^xmlreader$' \ + && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ && php-fpm -m | grep -oiE '^xmlrpc$' \ && php -m | grep -oiE '^xmlwriter$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index 2ad019d3..edc6d905 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -18,97 +18,70 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ - librabbitmq-dev \ + firebird-dev \ + freetds-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ - libxml2-dev \ libenchant-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ + libfbclient2 \ libfreetype6-dev \ - libwebp-dev \ libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libkrb5-dev \ - libcurl4-openssl-dev \ - libfbclient2 \ libib-util \ - firebird-dev \ libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagickwand-dev \ libmcrypt-dev \ - zlib1g-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libnghttp2-dev \ + libpng-dev \ libpq-dev \ - libssl-dev \ libpspell-dev \ - libedit-dev \ - libreadline-dev \ - librecode-dev \ + librabbitmq-dev \ librdkafka-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + librecode-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ - libsodium-dev \ - libnghttp2-dev \ libssl-dev \ libtidy-dev \ + libvpx-dev \ + libwebp-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ - zlib1g-dev \ libzip-dev \ + snmp \ + zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - librabbitmq4 \ - libenchant1c2a \ - libpng16-16 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx4 \ - libfreetype6 \ - libwebp6 \ - libmagickwand-6.q16-3 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ libicu57 \ + libjpeg62-turbo \ + libmagickwand-6.q16-3 \ libmcrypt4 \ libmemcachedutil2 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libnghttp2-14 \ + libpng16-16 \ libpq5 \ - libaspell15 \ - librecode0 \ + librabbitmq4 \ librdkafka1 \ - snmp \ - libnghttp2-14 \ + librecode0 \ + libsybdb5 \ libtidy5 \ + libvpx4 \ + libwebp6 \ + libxpm4 \ libxslt1.1 \ libzip4 \ + snmp \ ca-certificates @@ -116,8 +89,9 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ @@ -131,47 +105,156 @@ RUN set -x \ && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ \ + \ + && rm -rf /usr/local/lib/php/test/ioncube || true \ + && rm -rf /usr/local/lib/php/doc/ioncube || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && echo "/usr" | pecl install amqp \ && docker-php-ext-enable amqp \ + \ + && rm -rf /usr/local/lib/php/test/amqp || true \ + && rm -rf /usr/local/lib/php/doc/amqp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install apcu \ && docker-php-ext-enable apcu \ + \ + && rm -rf /usr/local/lib/php/test/apcu || true \ + && rm -rf /usr/local/lib/php/doc/apcu || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) fileinfo \ - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + \ + && rm -rf /usr/local/lib/php/test/gmp || true \ + && rm -rf /usr/local/lib/php/doc/gmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install igbinary \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install imagick \ && docker-php-ext-enable imagick \ + \ + && rm -rf /usr/local/lib/php/test/imagick || true \ + && rm -rf /usr/local/lib/php/doc/imagick || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mcrypt-1.0.1 \ && docker-php-ext-enable mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/websupport-sk/pecl-memcache /tmp/memcache \ && cd /tmp/memcache \ && phpize \ @@ -179,58 +262,197 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && docker-php-ext-enable memcache \ - && cd / && rm -rf /tmp/memcache \ + \ + && rm -rf /usr/local/lib/php/test/memcache || true \ + && rm -rf /usr/local/lib/php/doc/memcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install memcached \ && docker-php-ext-enable memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mongodb \ && docker-php-ext-enable mongodb \ + \ + && rm -rf /usr/local/lib/php/test/mongodb || true \ + && rm -rf /usr/local/lib/php/doc/mongodb || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install msgpack \ && docker-php-ext-enable msgpack \ + \ + && rm -rf /usr/local/lib/php/test/msgpack || true \ + && rm -rf /usr/local/lib/php/doc/msgpack || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqlnd || true \ + && rm -rf /usr/local/lib/php/doc/mysqlnd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/phalcon/cphalcon /tmp/phalcon \ && cd /tmp/phalcon \ && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ && cd build && ./install \ && docker-php-ext-enable phalcon \ - && cd / && rm -rf /tmp/phalcon \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) phar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + \ + && rm -rf /usr/local/lib/php/test/phalcon || true \ + && rm -rf /usr/local/lib/php/doc/phalcon || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/phar || true \ + && rm -rf /usr/local/lib/php/doc/phar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) readline \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/readline || true \ + && rm -rf /usr/local/lib/php/doc/readline || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis \ && docker-php-ext-enable redis \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install rdkafka \ && docker-php-ext-enable rdkafka \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + \ + && rm -rf /usr/local/lib/php/test/rdkafka || true \ + && rm -rf /usr/local/lib/php/doc/rdkafka || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/sodium || true \ + && rm -rf /usr/local/lib/php/doc/sodium || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install swoole \ && docker-php-ext-enable swoole \ + \ + && rm -rf /usr/local/lib/php/test/swoole || true \ + && rm -rf /usr/local/lib/php/doc/swoole || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ && cd /tmp/uploadprogress \ && phpize \ @@ -238,43 +460,85 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && docker-php-ext-enable uploadprogress \ - && cd / && rm -rf /tmp/uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install xdebug \ && docker-php-ext-enable xdebug \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ + \ + && rm -rf /usr/local/lib/php/test/xdebug || true \ + && rm -rf /usr/local/lib/php/doc/xdebug || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^apcu$' \ @@ -299,6 +563,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -325,6 +591,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ @@ -339,10 +607,16 @@ RUN set -x \ && php-fpm -m | grep -oiE '^msgpack$' \ && php -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ && php -m | grep -oiE '^pdo$' \ && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ @@ -407,6 +681,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^xdebug$' \ && php -m | grep -oiE '^xml$' \ && php-fpm -m | grep -oiE '^xml$' \ + && php -m | grep -oiE '^xmlreader$' \ + && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ && php-fpm -m | grep -oiE '^xmlrpc$' \ && php -m | grep -oiE '^xmlwriter$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index 5bbb0e09..ae93e5d4 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -18,97 +18,71 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ + cmake \ + firebird-dev \ + freetds-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ - libxml2-dev \ libenchant-dev \ - libssl-dev \ - libpng-dev \ - libjpeg-dev \ - libxpm-dev \ - libvpx-dev \ - zlib1g-dev \ + libfbclient2 \ libfreetype6-dev \ - libwebp-dev \ libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libkrb5-dev \ - libcurl4-openssl-dev \ - libfbclient2 \ + libhiredis-dev \ libib-util \ - firebird-dev \ libicu-dev \ + libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ - libsasl2-dev \ + libmagickwand-dev \ libmcrypt-dev \ - zlib1g-dev \ libmemcached-dev \ - libssl-dev \ - libsasl2-dev \ - freetds-dev \ - libfbclient2 \ - libib-util \ - firebird-dev \ - zlib1g-dev \ - libpq-dev \ - libsqlite3-dev \ + libnghttp2-dev \ + libpng-dev \ libpq-dev \ - libssl-dev \ libpspell-dev \ - libedit-dev \ - libreadline-dev \ - librecode-dev \ librdkafka-dev \ - libmm-dev \ - libxml2-dev \ - libssl-dev \ + librecode-dev \ + libsasl2-dev \ libsnmp-dev \ - snmp \ - libxml2-dev \ - libsodium-dev \ - libnghttp2-dev \ libssl-dev \ - libhiredis-dev \ - cmake \ libtidy-dev \ + libvpx-dev \ + libwebp-dev \ libxml2-dev \ - libxml2-dev \ - libxml2-dev \ - libxml2-dev \ + libxpm-dev \ libxslt-dev \ - zlib1g-dev \ libzip-dev \ + snmp \ + zlib1g-dev \ ca-certificates \ git ENV RUN_DEPS \ - libenchant1c2a \ - libpng16-16 \ - libjpeg62-turbo \ - libxpm4 \ - libvpx4 \ - libfreetype6 \ - libwebp6 \ - libmagickwand-6.q16-3 \ + libaspell15 \ libc-client2007e \ + libenchant1c2a \ libfbclient2 \ + libfreetype6 \ + libhiredis0.13 \ libicu57 \ + libjpeg62-turbo \ + libmagickwand-6.q16-3 \ libmcrypt4 \ libmemcachedutil2 \ - libsybdb5 \ - libfbclient2 \ - libpq5 \ + libnghttp2-14 \ + libpng16-16 \ libpq5 \ - libaspell15 \ - librecode0 \ librdkafka1 \ - snmp \ - libnghttp2-14 \ - libhiredis0.13 \ + librecode0 \ + libsybdb5 \ libtidy5 \ + libvpx4 \ + libwebp6 \ + libxpm4 \ libxslt1.1 \ libzip4 \ + snmp \ ca-certificates @@ -116,93 +90,302 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ && pecl install apcu \ && docker-php-ext-enable apcu \ + \ + && rm -rf /usr/local/lib/php/test/apcu || true \ + && rm -rf /usr/local/lib/php/doc/apcu || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + \ + && rm -rf /usr/local/lib/php/test/bcmath || true \ + && rm -rf /usr/local/lib/php/doc/bcmath || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + \ + && rm -rf /usr/local/lib/php/test/bz2 || true \ + && rm -rf /usr/local/lib/php/doc/bz2 || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + \ + && rm -rf /usr/local/lib/php/test/calendar || true \ + && rm -rf /usr/local/lib/php/doc/calendar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ctype || true \ + && rm -rf /usr/local/lib/php/doc/ctype || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/curl || true \ + && rm -rf /usr/local/lib/php/doc/curl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ - && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + \ + && rm -rf /usr/local/lib/php/test/dba || true \ + && rm -rf /usr/local/lib/php/doc/dba || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/dom || true \ + && rm -rf /usr/local/lib/php/doc/dom || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + \ + && rm -rf /usr/local/lib/php/test/enchant || true \ + && rm -rf /usr/local/lib/php/doc/enchant || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) fileinfo \ - && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + \ + && rm -rf /usr/local/lib/php/test/exif || true \ + && rm -rf /usr/local/lib/php/doc/exif || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/fileinfo || true \ + && rm -rf /usr/local/lib/php/doc/fileinfo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/filter || true \ + && rm -rf /usr/local/lib/php/doc/filter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/ftp || true \ + && rm -rf /usr/local/lib/php/doc/ftp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + \ + && rm -rf /usr/local/lib/php/test/gd || true \ + && rm -rf /usr/local/lib/php/doc/gd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + \ + && rm -rf /usr/local/lib/php/test/gettext || true \ + && rm -rf /usr/local/lib/php/doc/gettext || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + \ + && rm -rf /usr/local/lib/php/test/gmp || true \ + && rm -rf /usr/local/lib/php/doc/gmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/hash || true \ + && rm -rf /usr/local/lib/php/doc/hash || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/iconv || true \ + && rm -rf /usr/local/lib/php/doc/iconv || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install igbinary \ && docker-php-ext-enable igbinary \ + \ + && rm -rf /usr/local/lib/php/test/igbinary || true \ + && rm -rf /usr/local/lib/php/doc/igbinary || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install imagick \ && docker-php-ext-enable imagick \ + \ + && rm -rf /usr/local/lib/php/test/imagick || true \ + && rm -rf /usr/local/lib/php/doc/imagick || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + \ + && rm -rf /usr/local/lib/php/test/imap || true \ + && rm -rf /usr/local/lib/php/doc/imap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + \ + && rm -rf /usr/local/lib/php/test/interbase || true \ + && rm -rf /usr/local/lib/php/doc/interbase || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + \ + && rm -rf /usr/local/lib/php/test/intl || true \ + && rm -rf /usr/local/lib/php/doc/intl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/json || true \ + && rm -rf /usr/local/lib/php/doc/json || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + \ + && rm -rf /usr/local/lib/php/test/ldap || true \ + && rm -rf /usr/local/lib/php/doc/ldap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/libxml || true \ + && rm -rf /usr/local/lib/php/doc/libxml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mbstring || true \ + && rm -rf /usr/local/lib/php/doc/mbstring || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mcrypt-1.0.1 \ && docker-php-ext-enable mcrypt \ + \ + && rm -rf /usr/local/lib/php/test/mcrypt || true \ + && rm -rf /usr/local/lib/php/doc/mcrypt || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/php-memcached-dev/php-memcached /tmp/memcached \ && cd /tmp/memcached \ && git checkout master \ && phpize && ./configure --enable-memcached && make -j$(getconf _NPROCESSORS_ONLN) && make install \ && docker-php-ext-enable memcached \ - && cd / && rm -rf /tmp/memcached \ + \ + && rm -rf /usr/local/lib/php/test/memcached || true \ + && rm -rf /usr/local/lib/php/doc/memcached || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install mongodb \ && docker-php-ext-enable mongodb \ + \ + && rm -rf /usr/local/lib/php/test/mongodb || true \ + && rm -rf /usr/local/lib/php/doc/mongodb || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + \ + && rm -rf /usr/local/lib/php/test/mysqli || true \ + && rm -rf /usr/local/lib/php/doc/mysqli || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/mysqlnd || true \ + && rm -rf /usr/local/lib/php/doc/mysqlnd || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + \ + && rm -rf /usr/local/lib/php/test/opcache || true \ + && rm -rf /usr/local/lib/php/doc/opcache || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/openssl || true \ + && rm -rf /usr/local/lib/php/doc/openssl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + \ + && rm -rf /usr/local/lib/php/test/pcntl || true \ + && rm -rf /usr/local/lib/php/doc/pcntl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pcre || true \ + && rm -rf /usr/local/lib/php/doc/pcre || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo || true \ + && rm -rf /usr/local/lib/php/doc/pdo || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + \ + && rm -rf /usr/local/lib/php/test/pdo_dblib || true \ + && rm -rf /usr/local/lib/php/doc/pdo_dblib || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + \ + && rm -rf /usr/local/lib/php/test/pdo_firebird || true \ + && rm -rf /usr/local/lib/php/doc/pdo_firebird || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + \ + && rm -rf /usr/local/lib/php/test/pdo_mysql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_mysql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + \ + && rm -rf /usr/local/lib/php/test/pdo_pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pdo_pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/pdo_sqlite || true \ + && rm -rf /usr/local/lib/php/doc/pdo_sqlite || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) phar \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + \ + && rm -rf /usr/local/lib/php/test/pgsql || true \ + && rm -rf /usr/local/lib/php/doc/pgsql || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/phar || true \ + && rm -rf /usr/local/lib/php/doc/phar || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/posix || true \ + && rm -rf /usr/local/lib/php/doc/posix || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) readline \ + \ + && rm -rf /usr/local/lib/php/test/pspell || true \ + && rm -rf /usr/local/lib/php/doc/pspell || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/readline || true \ + && rm -rf /usr/local/lib/php/doc/readline || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + \ + && rm -rf /usr/local/lib/php/test/recode || true \ + && rm -rf /usr/local/lib/php/doc/recode || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install redis \ && docker-php-ext-enable redis \ + \ + && rm -rf /usr/local/lib/php/test/redis || true \ + && rm -rf /usr/local/lib/php/doc/redis || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && pecl install rdkafka \ && docker-php-ext-enable rdkafka \ - && /usr/local/bin/docker-php-ext-configure session --with-mm \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + \ + && rm -rf /usr/local/lib/php/test/rdkafka || true \ + && rm -rf /usr/local/lib/php/doc/rdkafka || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/session || true \ + && rm -rf /usr/local/lib/php/doc/session || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ - && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + \ + && rm -rf /usr/local/lib/php/test/shmop || true \ + && rm -rf /usr/local/lib/php/doc/shmop || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/simplexml || true \ + && rm -rf /usr/local/lib/php/doc/simplexml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + \ + && rm -rf /usr/local/lib/php/test/snmp || true \ + && rm -rf /usr/local/lib/php/doc/snmp || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + \ + && rm -rf /usr/local/lib/php/test/soap || true \ + && rm -rf /usr/local/lib/php/doc/soap || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \ + \ + && rm -rf /usr/local/lib/php/test/sockets || true \ + && rm -rf /usr/local/lib/php/doc/sockets || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/sodium || true \ + && rm -rf /usr/local/lib/php/doc/sodium || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/swoole/swoole-src /tmp/swoole \ && cd /tmp/swoole \ && git checkout master \ - && git submodule update --init --recursive \ + && git checkout $(git describe --abbrev=0 --tags) \ +&& git submodule update --init --recursive \ && cd thirdparty/hiredis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ @@ -236,12 +419,34 @@ RUN set -x \ && make install \ \ && docker-php-ext-enable swoole \ - && cd / && rm -rf /tmp/swoole \ + \ + && rm -rf /usr/local/lib/php/test/swoole || true \ + && rm -rf /usr/local/lib/php/doc/swoole || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + \ + && rm -rf /usr/local/lib/php/test/sysvmsg || true \ + && rm -rf /usr/local/lib/php/doc/sysvmsg || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + \ + && rm -rf /usr/local/lib/php/test/sysvsem || true \ + && rm -rf /usr/local/lib/php/doc/sysvsem || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + \ + && rm -rf /usr/local/lib/php/test/sysvshm || true \ + && rm -rf /usr/local/lib/php/doc/sysvshm || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + \ + && rm -rf /usr/local/lib/php/test/tidy || true \ + && rm -rf /usr/local/lib/php/doc/tidy || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/tokenizer || true \ + && rm -rf /usr/local/lib/php/doc/tokenizer || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && git clone -v https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ && cd /tmp/uploadprogress \ && phpize \ @@ -249,41 +454,79 @@ RUN set -x \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && docker-php-ext-enable uploadprogress \ - && cd / && rm -rf /tmp/uploadprogress \ + \ + && rm -rf /usr/local/lib/php/test/uploadprogress || true \ + && rm -rf /usr/local/lib/php/doc/uploadprogress || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ - && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ + \ + && rm -rf /usr/local/lib/php/test/wddx || true \ + && rm -rf /usr/local/lib/php/doc/wddx || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xml || true \ + && rm -rf /usr/local/lib/php/doc/xml || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlreader || true \ + && rm -rf /usr/local/lib/php/doc/xmlreader || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ - && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + \ + && rm -rf /usr/local/lib/php/test/xmlrpc || true \ + && rm -rf /usr/local/lib/php/doc/xmlrpc || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + \ + && rm -rf /usr/local/lib/php/test/xmlwriter || true \ + && rm -rf /usr/local/lib/php/doc/xmlwriter || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + \ + && rm -rf /usr/local/lib/php/test/xsl || true \ + && rm -rf /usr/local/lib/php/doc/xsl || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ \ + && rm -rf /usr/local/lib/php/test/zip || true \ + && rm -rf /usr/local/lib/php/doc/zip || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ + && rm -rf /tmp/* \ \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ - \ - \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ && php -m | grep -oiE '^apcu$' \ && php-fpm -m | grep -oiE '^apcu$' \ && php -m | grep -oiE '^bcmath$' \ @@ -306,6 +549,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^exif$' \ && php -m | grep -oiE '^fileinfo$' \ && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ && php -m | grep -oiE '^ftp$' \ && php-fpm -m | grep -oiE '^ftp$' \ && php -m | grep -oiE '^gd$' \ @@ -332,6 +577,10 @@ RUN set -x \ && php-fpm -m | grep -oiE '^json$' \ && php -m | grep -oiE '^ldap$' \ && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ + && php -m | grep -oiE '^mbstring$' \ + && php-fpm -m | grep -oiE '^mbstring$' \ && php -m | grep -oiE '^mcrypt$' \ && php-fpm -m | grep -oiE '^mcrypt$' \ && php -m | grep -oiE '^memcached$' \ @@ -340,10 +589,16 @@ RUN set -x \ && php-fpm -m | grep -oiE '^mongodb$' \ && php -m | grep -oiE '^mysqli$' \ && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ && php -m | grep -oiE '^pcntl$' \ && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ && php -m | grep -oiE '^pdo$' \ && php-fpm -m | grep -oiE '^pdo$' \ && php -m | grep -oiE '^pdo_dblib$' \ @@ -404,6 +659,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xml$' \ && php-fpm -m | grep -oiE '^xml$' \ + && php -m | grep -oiE '^xmlreader$' \ + && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ && php-fpm -m | grep -oiE '^xmlrpc$' \ && php -m | grep -oiE '^xmlwriter$' \ diff --git a/Dockerfiles/prod/Dockerfile-5.2 b/Dockerfiles/prod/Dockerfile-5.2 index f10c2e31..5e3a012d 100644 --- a/Dockerfiles/prod/Dockerfile-5.2 +++ b/Dockerfiles/prod/Dockerfile-5.2 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/prod/Dockerfile-5.3 b/Dockerfiles/prod/Dockerfile-5.3 index c518baa9..7c8b4eaf 100644 --- a/Dockerfiles/prod/Dockerfile-5.3 +++ b/Dockerfiles/prod/Dockerfile-5.3 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/prod/Dockerfile-5.4 b/Dockerfiles/prod/Dockerfile-5.4 index 8ae68068..8e3aae65 100644 --- a/Dockerfiles/prod/Dockerfile-5.4 +++ b/Dockerfiles/prod/Dockerfile-5.4 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/prod/Dockerfile-5.5 b/Dockerfiles/prod/Dockerfile-5.5 index df204b87..b20abb44 100644 --- a/Dockerfiles/prod/Dockerfile-5.5 +++ b/Dockerfiles/prod/Dockerfile-5.5 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/prod/Dockerfile-5.6 b/Dockerfiles/prod/Dockerfile-5.6 index c9206724..848e7214 100644 --- a/Dockerfiles/prod/Dockerfile-5.6 +++ b/Dockerfiles/prod/Dockerfile-5.6 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/prod/Dockerfile-7.0 b/Dockerfiles/prod/Dockerfile-7.0 index 6d61515b..03af05a7 100644 --- a/Dockerfiles/prod/Dockerfile-7.0 +++ b/Dockerfiles/prod/Dockerfile-7.0 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/prod/Dockerfile-7.1 b/Dockerfiles/prod/Dockerfile-7.1 index ee4d98bb..70b56617 100644 --- a/Dockerfiles/prod/Dockerfile-7.1 +++ b/Dockerfiles/prod/Dockerfile-7.1 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/prod/Dockerfile-7.2 b/Dockerfiles/prod/Dockerfile-7.2 index bae41cd0..1a38dc65 100644 --- a/Dockerfiles/prod/Dockerfile-7.2 +++ b/Dockerfiles/prod/Dockerfile-7.2 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/prod/Dockerfile-7.3 b/Dockerfiles/prod/Dockerfile-7.3 index 7beefbb3..14daca81 100644 --- a/Dockerfiles/prod/Dockerfile-7.3 +++ b/Dockerfiles/prod/Dockerfile-7.3 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -39,10 +44,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini ### diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 5e526016..961d6e6d 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,14 +103,23 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # awesomeci && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ @@ -192,9 +202,13 @@ RUN set -x \ # webpack && npm install -g webpack webpack-cli \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -216,7 +230,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -243,10 +262,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.2' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && ansible --version | grep -E '^ansible [.0-9]+$' \ diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index f889ad15..508e4d2e 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,16 +103,25 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # awesomeci && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ @@ -131,7 +141,7 @@ RUN set -x \ && npm install -g gulp \ \ # codeception - && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ + && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ # drush7 @@ -140,13 +150,12 @@ RUN set -x \ && git checkout 7.4.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ -&& rm -rf /usr/local/src/drush7/tests \ \ # gitflow && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ @@ -230,9 +239,13 @@ RUN set -x \ && curl https://github.com/wp-cli/wp-cli/releases/download/v1.5.1/wp-cli-1.5.1.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -254,7 +267,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -281,10 +299,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index a23b8663..13c59150 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,16 +103,25 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # awesomeci && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ @@ -131,7 +141,7 @@ RUN set -x \ && npm install -g gulp \ \ # codeception - && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ + && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ # deployer @@ -143,13 +153,12 @@ RUN set -x \ && git checkout 7.4.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ -&& rm -rf /usr/local/src/drush7/tests \ \ # drush8 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ @@ -157,13 +166,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ && rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ -&& rm -rf /usr/local/src/drush8/tests \ \ # gitflow && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ @@ -179,7 +187,7 @@ RUN set -x \ && git checkout v1.3.7 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ @@ -260,9 +268,13 @@ RUN set -x \ && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -284,7 +296,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -311,10 +328,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.4' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 31d6ceae..606b3df9 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,16 +103,25 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # asgardcms && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ @@ -135,7 +145,7 @@ RUN set -x \ && npm install -g gulp \ \ # codeception - && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ + && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ # deployer @@ -147,13 +157,12 @@ RUN set -x \ && git checkout 7.4.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ -&& rm -rf /usr/local/src/drush7/tests \ \ # drush8 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ @@ -161,13 +170,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ && rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ -&& rm -rf /usr/local/src/drush8/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -186,7 +194,7 @@ RUN set -x \ && git checkout v2.0.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ @@ -271,9 +279,13 @@ RUN set -x \ && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -295,7 +307,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -322,10 +339,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.5' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 33cd0c68..c105fd61 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,16 +103,25 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # asgardcms && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ @@ -135,7 +145,7 @@ RUN set -x \ && npm install -g gulp \ \ # codeception - && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ + && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ # deployer @@ -147,13 +157,12 @@ RUN set -x \ && git checkout 7.4.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ -&& rm -rf /usr/local/src/drush7/tests \ \ # drush8 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ @@ -161,13 +170,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ && rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ -&& rm -rf /usr/local/src/drush8/tests \ \ # drush9 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ @@ -175,13 +183,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ && rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ -&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -200,7 +207,7 @@ RUN set -x \ && git checkout v2.0.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ @@ -285,9 +292,13 @@ RUN set -x \ && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -309,7 +320,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -336,10 +352,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.6' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index c3e7d7f0..c876a841 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,16 +103,25 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # asgardcms && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ @@ -135,7 +145,7 @@ RUN set -x \ && npm install -g gulp \ \ # codeception - && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ + && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ # deployer @@ -147,13 +157,12 @@ RUN set -x \ && git checkout 7.4.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ -&& rm -rf /usr/local/src/drush7/tests \ \ # drush8 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ @@ -161,13 +170,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ && rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ -&& rm -rf /usr/local/src/drush8/tests \ \ # drush9 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ @@ -175,13 +183,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ && rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ -&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -200,7 +207,7 @@ RUN set -x \ && git checkout v2.0.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ @@ -285,9 +292,13 @@ RUN set -x \ && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -309,7 +320,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -336,10 +352,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.0' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 318b952a..341930e6 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,16 +103,25 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # asgardcms && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ @@ -135,7 +145,7 @@ RUN set -x \ && npm install -g gulp \ \ # codeception - && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ + && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ # deployer @@ -147,13 +157,12 @@ RUN set -x \ && git checkout 7.4.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ -&& rm -rf /usr/local/src/drush7/tests \ \ # drush8 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ @@ -161,13 +170,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ && rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ -&& rm -rf /usr/local/src/drush8/tests \ \ # drush9 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ @@ -175,13 +183,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ && rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ -&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -200,7 +207,7 @@ RUN set -x \ && git checkout $(git describe --abbrev=0 --tags) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ @@ -285,9 +292,13 @@ RUN set -x \ && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -309,7 +320,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -336,10 +352,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.1' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 9faab88e..c057d9d6 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,16 +103,25 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # asgardcms && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ @@ -135,7 +145,7 @@ RUN set -x \ && npm install -g gulp \ \ # codeception - && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ + && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ # deployer @@ -147,13 +157,12 @@ RUN set -x \ && git checkout 7.4.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ -&& rm -rf /usr/local/src/drush7/tests \ \ # drush8 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ @@ -161,13 +170,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ && rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ -&& rm -rf /usr/local/src/drush8/tests \ \ # drush9 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ @@ -175,13 +183,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ && rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ -&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -200,7 +207,7 @@ RUN set -x \ && git checkout $(git describe --abbrev=0 --tags) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ @@ -285,9 +292,13 @@ RUN set -x \ && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -309,7 +320,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -336,10 +352,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.2' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 05114b4f..23ca571e 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -24,8 +24,9 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ @@ -39,8 +40,8 @@ RUN set -x \ && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -102,16 +103,25 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ # composer && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ # ansible - && pip install --upgrade setuptools \ -&& pip install ansible \ + && /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ +&& /usr/local/bin/pip install --no-cache-dir ansible \ \ # asgardcms && COMPOSER_HOME="/usr/local/src/composer" composer global require asgardcms/asgardcms-installer \ @@ -135,7 +145,7 @@ RUN set -x \ && npm install -g gulp \ \ # codeception - && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \ + && COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception \ && ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ \ # deployer @@ -147,13 +157,12 @@ RUN set -x \ && git checkout 7.4.0 \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ -&& rm -rf /usr/local/src/drush7/tests \ \ # drush8 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush8 \ @@ -161,13 +170,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ && rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ -&& rm -rf /usr/local/src/drush8/tests \ \ # drush9 && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush9 \ @@ -175,13 +183,12 @@ RUN set -x \ && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ && rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ -&& rm -rf /usr/local/src/drush9/tests \ \ # drupalconsole && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ @@ -200,7 +207,7 @@ RUN set -x \ && git checkout $(git describe --abbrev=0 --tags) \ \ && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ -&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ \ @@ -274,9 +281,13 @@ RUN set -x \ && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ && chmod +x /usr/local/bin/wp \ # yamllint - && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ - && pip install yamllint \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + \ + && /usr/local/bin/pip install --no-cache-dir yamllint \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ +&& rm -rf /var/lib/apt/lists/* \ + \ # cleanup && rm -rf /home/${MY_USER}/.*json \ && rm -rf /home/${MY_USER}/.cache \ @@ -298,7 +309,12 @@ RUN set -x \ \ && rm -rf /tmp/* \ \ - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -325,10 +341,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.3' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 4253891f..5613dcd5 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -44,9 +44,8 @@ RUN set -x \ ### Upgrade (install ps) ### RUN set -x \ - && apt-get update \ - && apt-get upgrade -y \ - && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ && rm -rf /var/lib/apt/lists/* @@ -77,10 +76,20 @@ COPY ./data/docker-entrypoint.d /docker-entrypoint.d ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini {% endif %} diff --git a/build/ansible/DOCKERFILES/Dockerfile-mods.j2 b/build/ansible/DOCKERFILES/Dockerfile-mods.j2 index a1ae34be..dff6f52a 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-mods.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-mods.j2 @@ -18,43 +18,56 @@ LABEL \ ### Envs ### ENV BUILD_DEPS \ -{# Loop over enabled build dependencies #} -{% for ext in extensions_enabled %} -{# Not disabled #} -{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %} -{# Version specific build dependency available? #} -{% if php_version in extensions_available[ext] and 'build_dep' in extensions_available[ext][php_version] %} -{% for build_dep in extensions_available[ext][php_version]['build_dep'] %} - {{ build_dep }} \ -{% endfor %} -{# Generic build dependency available? #} -{% elif 'all' in extensions_available[ext] and 'build_dep' in extensions_available[ext]['all'] %} -{% for build_dep in extensions_available[ext]['all']['build_dep'] %} +{# Loop over enabled build dependencies -#} +{%- set build_deps = [] -%} +{%- for ext in extensions_enabled -%} + {#- Not disabled AND not already available by default -#} + {%- if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) + and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) -%} + {#- Version specific build dependency available? -#} + {%- if php_version in extensions_available[ext] and 'build_dep' in extensions_available[ext][php_version] -%} + {%- for build_dep in extensions_available[ext][php_version]['build_dep'] -%} + {#- Append build dependencies to our array -#} + {{- build_deps.append(build_dep) -}} + {%- endfor -%} + {#- Generic build dependency available? -#} + {%- elif 'all' in extensions_available[ext] and 'build_dep' in extensions_available[ext]['all'] -%} + {%- for build_dep in extensions_available[ext]['all']['build_dep'] -%} + {#- Append build dependencies to our array -#} + {{- build_deps.append(build_dep) -}} + {%- endfor -%} + {%- endif -%} + {%- endif -%} +{%- endfor -%} +{% for build_dep in build_deps | unique | sort %} {{ build_dep }} \ -{% endfor %} -{% endif %} -{% endif %} {% endfor %} ca-certificates \ git ENV RUN_DEPS \ -{# Loop over enabled run-time dependencies #} -{% for ext in extensions_enabled %} -{# Not disabled #} -{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %} -{# Version specific run-time dependency available? #} -{% if php_version in extensions_available[ext] and 'run_dep' in extensions_available[ext][php_version] %} -{% for run_dep in extensions_available[ext][php_version]['run_dep'] %} +{# Loop over enabled run-time dependencies -#} +{%- set run_deps = [] -%} +{%- for ext in extensions_enabled -%} + {#- Not disabled -#} + {%- if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) -%} + {#- Version specific run-time dependency available? -#} + {%- if php_version in extensions_available[ext] and 'run_dep' in extensions_available[ext][php_version] -%} + {%- for run_dep in extensions_available[ext][php_version]['run_dep'] -%} + {#- Append run dependencies to our array -#} + {{- run_deps.append(run_dep) -}} + {%- endfor -%} + {#- Generic run-time dependency available? -#} + {%- elif 'all' in extensions_available[ext] and 'run_dep' in extensions_available[ext]['all'] -%} + {%- for run_dep in extensions_available[ext]['all']['run_dep'] -%} + {#- Append run dependencies to our array -#} + {{- run_deps.append(run_dep) -}} + {%- endfor -%} + {%- endif -%} + {%- endif -%} +{%- endfor -%} +{% for run_dep in run_deps | unique | sort %} {{ run_dep }} \ -{% endfor %} -{# Generic run-time dependency available? #} -{% elif 'all' in extensions_available[ext] and 'run_dep' in extensions_available[ext]['all'] %} -{% for run_dep in extensions_available[ext]['all']['run_dep'] %} - {{ run_dep }} \ -{% endfor %} -{% endif %} -{% endif %} {% endfor %} ca-certificates @@ -63,111 +76,124 @@ ENV RUN_DEPS \ ### Install ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ${BUILD_DEPS} \ \ \ {# Loop over enabled extensions #} {% for ext in extensions_enabled %} -{# Not disabled #} -{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %} -{# ---------- Pre Command ---------- #} -{# Version specific pre-command available? #} -{% if php_version in extensions_available[ext] and 'pre' in extensions_available[ext][php_version] %} +{# Not disabled AND not already enabled #} +{% if (('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled'])) and ('already_avail' not in extensions_available[ext] or php_version not in extensions_available[ext]['already_avail']) %} +{# ---------- Pre Command ---------- #} +{# Version specific pre-command available? #} +{% if php_version in extensions_available[ext] and 'pre' in extensions_available[ext][php_version] %} && {{ extensions_available[ext][php_version]['pre'] }} \ -{# Generic pre-command available? #} -{% elif 'all' in extensions_available[ext] and 'pre' in extensions_available[ext]['all'] %} +{# Generic pre-command available? #} +{% elif 'all' in extensions_available[ext] and 'pre' in extensions_available[ext]['all'] %} && {{ extensions_available[ext]['all']['pre'] }} \ -{% endif %} -{# ---------- Installation (specific) ---------- #} -{% if php_version in extensions_available[ext] and 'type' in extensions_available[ext][php_version] %} -{# ---- 1.) Builtin ---- #} -{% if extensions_available[ext][php_version]['type'] == 'builtin' %} -{% if 'configure' in extensions_available[ext][php_version] %} +{% endif %} +{# ---------- Installation (specific) ---------- #} +{% if php_version in extensions_available[ext] and 'type' in extensions_available[ext][php_version] %} +{# ---- 1.) Builtin ---- #} +{% if extensions_available[ext][php_version]['type'] == 'builtin' %} +{% if 'configure' in extensions_available[ext][php_version] %} && /usr/local/bin/docker-php-ext-configure {{ ext }} {{ extensions_available[ext][php_version]['configure'] }} \ -{% endif %} +{% endif %} && /usr/local/bin/docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \ -{# ---- 2.) PECL ---- #} -{% elif extensions_available[ext][php_version]['type'] == 'pecl' %} -{% if 'command' in extensions_available[ext][php_version] %} +{# ---- 2.) PECL ---- #} +{% elif extensions_available[ext][php_version]['type'] == 'pecl' %} +{% if 'command' in extensions_available[ext][php_version] %} && {{ extensions_available[ext][php_version]['command'] }} \ -{% else %} +{% else %} && pecl install {{ ext }}{% if 'version' in extensions_available[ext][php_version] %}-{{ extensions_available[ext][php_version]['version'] }}{% endif %} \ -{% endif %} +{% endif %} && docker-php-ext-enable {{ ext }} \ -{# ---- 3.) GIT ---- #} -{% elif extensions_available[ext][php_version]['type'] == 'git' %} +{# ---- 3.) GIT ---- #} +{% elif extensions_available[ext][php_version]['type'] == 'git' %} && git clone -v {{ extensions_available[ext][php_version]['git_url'] }} /tmp/{{ ext }} \ && cd /tmp/{{ ext }} \ -{% if 'git_ref' in extensions_available[ext][php_version] %} +{% if 'git_ref' in extensions_available[ext][php_version] %} && git checkout {{ extensions_available[ext][php_version]['git_ref'] }} \ -{% endif %} -{% if 'command' in extensions_available[ext][php_version] %} +{% endif %} +{% if 'command' in extensions_available[ext][php_version] %} && {{ extensions_available[ext][php_version]['command'] }} \ -{% else %} +{% else %} && phpize \ && ./configure {% if 'configure' in extensions_available[ext][php_version] %} {{ extensions_available[ext][php_version]['configure'] }}{% endif %} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -{% endif %} +{% endif %} && docker-php-ext-enable {{ ext }} \ - && cd / && rm -rf /tmp/{{ ext }} \ -{# ---- 4.) CUSTOM ---- #} -{% elif extensions_available[ext][php_version]['type'] == 'custom' %} +{# ---- 4.) CUSTOM ---- #} +{% elif extensions_available[ext][php_version]['type'] == 'custom' %} && {{ extensions_available[ext][php_version]['command'] }} \ -{% endif %} -{# ---------- Installation (generic) ---------- #} -{% elif 'all' in extensions_available[ext] and 'type' in extensions_available[ext]['all'] %} -{# ---- 1.) Builtin ---- #} -{% if extensions_available[ext]['all']['type'] == 'builtin' %} -{% if 'configure' in extensions_available[ext]['all'] %} +{% endif %} +{# ---------- Installation (generic) ---------- #} +{% elif 'all' in extensions_available[ext] and 'type' in extensions_available[ext]['all'] %} +{# ---- 1.) Builtin ---- #} +{% if extensions_available[ext]['all']['type'] == 'builtin' %} +{% if 'configure' in extensions_available[ext]['all'] %} && /usr/local/bin/docker-php-ext-configure {{ ext }} {{ extensions_available[ext]['all']['configure'] }} \ -{% endif %} +{% endif %} && /usr/local/bin/docker-php-ext-install{% if php_version != 5.4 %} -j$(getconf _NPROCESSORS_ONLN){% endif %} {{ ext }} \ -{# ---- 2.) PECL ---- #} -{% elif extensions_available[ext]['all']['type'] == 'pecl' %} -{% if 'command' in extensions_available[ext]['all'] %} +{# ---- 2.) PECL ---- #} +{% elif extensions_available[ext]['all']['type'] == 'pecl' %} +{% if 'command' in extensions_available[ext]['all'] %} && {{ extensions_available[ext]['all']['command'] }} \ -{% else %} +{% else %} && pecl install {{ ext }}{% if 'version' in extensions_available[ext]['all'] %}-{{ extensions_available[ext]['all']['version'] }}{% endif %} \ -{% endif %} +{% endif %} && docker-php-ext-enable {{ ext }} \ -{# ---- 3.) GIT ---- #} -{% elif extensions_available[ext]['all']['type'] == 'git' %} +{# ---- 3.) GIT ---- #} +{% elif extensions_available[ext]['all']['type'] == 'git' %} && git clone -v {{ extensions_available[ext]['all']['git_url'] }} /tmp/{{ ext }} \ && cd /tmp/{{ ext }} \ -{% if 'git_ref' in extensions_available[ext]['all'] %} +{% if 'git_ref' in extensions_available[ext]['all'] %} && git checkout {{ extensions_available[ext]['all']['git_ref'] }} \ -{% endif %} -{% if 'command' in extensions_available[ext]['all'] %} +{% endif %} +{% if 'command' in extensions_available[ext]['all'] %} && {{ extensions_available[ext]['all']['command'] }} \ -{% else %} +{% else %} && phpize \ && ./configure {% if 'configure' in extensions_available[ext]['all'] %} {{ extensions_available[ext]['all']['configure'] }}{% endif %} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -{% endif %} +{% endif %} && docker-php-ext-enable {{ ext }} \ - && cd / && rm -rf /tmp/{{ ext }} \ -{# ---- 4.) CUSTOM ---- #} -{% elif extensions_available[ext]['all']['type'] == 'custom' %} +{# ---- 4.) CUSTOM ---- #} +{% elif extensions_available[ext]['all']['type'] == 'custom' %} && {{ extensions_available[ext]['all']['command'] }} \ -{% endif %} -{% endif %} -{% endif %} -{% endfor %} - \ - \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - ${BUILD_DEPS} \ +{% endif %} +{% endif %} +{% endif %} +{# Ensure modules that are not disabled have an appropriate ini directive and are loaded #} +{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %} +{% if php_version in extensions_available[ext] and 'load_ext' in extensions_available[ext][php_version] %} + && if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then echo "extension={{ extensions_available[ext][php_version]['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; fi \ +{% elif 'all' in extensions_available[ext] and 'load_ext' in extensions_available[ext]['all'] %} + && if [ ! -f "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini" ]; then echo "extenstion={{ extensions_available[ext]['all']['load_ext'] }}" > "/usr/local/etc/php/conf.d/docker-php-ext-{{ ext }}.ini"; fi \ +{% endif %} \ + && rm -rf /usr/local/lib/php/test/{{ ext }} || true \ + && rm -rf /usr/local/lib/php/doc/{{ ext }} || true \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* \ +{% endif %} +{% endfor %} + && rm -rf /tmp/* \ \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false ${BUILD_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests ${RUN_DEPS} \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ + \ && update-ca-certificates \ - && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find "$(php -r 'echo ini_get("extension_dir");')" -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true {% if debug %} @@ -175,25 +201,34 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi - -RUN set -x \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ {% for ext in extensions_enabled %} -{# Not disabled #} -{% if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %} -{% if ext == 'opcache' %} + {#- Not disabled #} + {%- if ('disabled' not in extensions_available[ext]) or (php_version not in extensions_available[ext]['disabled']) %} + {%- if ext == 'opcache' %} && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ -{% elif ext == 'ioncube' %} -{# Not enabled #} -{% else %} +{# #} + {%- elif ext not in ['ioncube'] %} && php -m | grep -oiE '^{{ ext }}$' \ && php-fpm -m | grep -oiE '^{{ ext }}$' \ -{% endif %} -{% endif %} +{# #} + {%- endif %} + {%- endif %} {% endfor %} && true diff --git a/build/ansible/DOCKERFILES/Dockerfile-prod.j2 b/build/ansible/DOCKERFILES/Dockerfile-prod.j2 index 95bb84a8..de0d5d50 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-prod.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-prod.j2 @@ -18,20 +18,25 @@ LABEL \ ### Install ### RUN set -x \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ locales-all \ postfix \ postfix-pcre \ rsyslog \ socat \ supervisor \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ && rm -rf /var/lib/apt/lists/* \ \ && rm -rf /etc/supervisor* \ && mkdir -p /etc/supervisor/conf.d \ - && mkdir -p /var/log/supervisor + && mkdir -p /var/log/supervisor \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true @@ -40,10 +45,20 @@ RUN set -x \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini {% endif %} diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 9a1baea3..ac28c2d9 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -24,38 +24,45 @@ ENV BASH_PROFILE=".bashrc" ### Install Tools ### RUN set -x \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ dirmngr \ gnupg \ -{% for repo in apt_repositories_enabled %} -{# Not disabled #} -{% if ('disabled' not in apt_repositories_available[repo]) or (php_version not in apt_repositories_available[repo]['disabled']) %} -{# Version specific pre-command available? #} -{% if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] %} +{% for repo in apt_repositories_enabled -%} + {#- Not disabled -#} + {%- if ('disabled' not in apt_repositories_available[repo]) or (php_version not in apt_repositories_available[repo]['disabled']) -%} + {#- Version specific pre-command available? -#} + {%- if php_version in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo][php_version] %} && {{ apt_repositories_available[repo][php_version]['pre'] }} \ -{# Generic pre-command available? #} -{% elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] %} +{# #} + {#- Generic pre-command available? -#} + {%- elif 'all' in apt_repositories_available[repo] and 'pre' in apt_repositories_available[repo]['all'] %} && {{ apt_repositories_available[repo]['all']['pre'] }} \ -{% endif %} -{# Version specific key available? #} -{% if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] %} +{# #} + {%- endif -%} + {#- Version specific key available? -#} + {%- if php_version in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo][php_version] %} && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo][php_version]['key'] }} \ -{# Generic key available? #} -{% elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] %} +{# #} + {#- Generic key available? -#} + {%- elif 'all' in apt_repositories_available[repo] and 'key' in apt_repositories_available[repo]['all'] %} && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv {{ apt_repositories_available[repo]['all']['key'] }} \ -{% endif %} -{# Version specific repository available? #} -{% if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] %} +{# #} + {%- endif -%} + {#- Version specific repository available? -#} + {%- if php_version in apt_repositories_available[repo] and 'deb' in apt_repositories_available[repo][php_version] %} && echo "{{ apt_repositories_available[repo][php_version]['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \ -{# Generic repository available? #} -{% else %} +{# #} + {#- Generic repository available? -#} + {%- else %} && echo "{{ apt_repositories_available[repo]['all']['deb'] }}" > /etc/apt/sources.list.d/{{ repo }}.list \ -{% endif %} -{% endif %} -{% endfor %} - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ +{# #} + {%- endif -%} + {%- endif -%} +{%- endfor %} + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ ack-grep \ aspell \ autoconf \ @@ -117,8 +124,17 @@ RUN set -x \ xz-utils \ yarn \ zsh \ - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ - && rm -rf /var/lib/apt/lists/* + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ +# Get newer pip version + && pip install --upgrade pip \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false python-pip \ + && rm -rf /var/lib/apt/lists/* \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true RUN set -x \ @@ -149,7 +165,12 @@ RUN set -x \ {% endif %} {% endif %} {% endfor %} - && true + \ + && rm -rf /usr/local/src/composer/cache/* || true \ + \ + && find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true \ + && find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true ### @@ -177,10 +198,20 @@ RUN \ ### Verify ### RUN set -x \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^{{ php_version }}' \ && /usr/local/sbin/php-fpm --test \ + \ && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ - && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini RUN set -x \ {% for tool in software_enabled %} diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 306b0f46..551a22ca 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -303,8 +303,8 @@ software_available: check: ansible --version | grep -E '^ansible [.0-9]+$' all: command: | - pip install --upgrade setuptools \ - && pip install ansible \ + /usr/local/bin/pip install --no-cache-dir --upgrade setuptools \ + && /usr/local/bin/pip install --no-cache-dir ansible \ awesomeci: check: | mdl --version | grep -E '[.0-9]+' \ @@ -352,13 +352,12 @@ software_available: && git checkout 7.4.0 \ command: | chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush7 \ - && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress' \ + && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush7 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush7/drush /usr/local/bin/drush7 \ && rm -rf /usr/local/src/drush7/.git \ && rm -rf /usr/local/src/drush7/docs \ && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ - && rm -rf /usr/local/src/drush7/tests \ drush8: disabled: [5.2, 5.3] check: drush8 --version | grep -E '8[.0-9]+\s*$' @@ -369,13 +368,12 @@ software_available: && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/8[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ command: | chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush8 \ - && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress' \ + && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush8 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush8/drush /usr/local/bin/drush8 \ && rm -rf /usr/local/src/drush8/.git \ && rm -rf /usr/local/src/drush8/docs \ && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ - && rm -rf /usr/local/src/drush8/tests \ drush9: disabled: [5.2, 5.3, 5.4, 5.5] check: drush9 --version | grep -E '9[.0-9]+\s*$' @@ -386,19 +384,18 @@ software_available: && git checkout $( git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | grep -E 'tags/9[.0-9]+$' | tail -1 | sed 's|.*/||g' ) \ command: | chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush9 \ - && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress' \ + && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush9 && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/drush9/drush /usr/local/bin/drush9 \ && rm -rf /usr/local/src/drush9/.git \ && rm -rf /usr/local/src/drush9/docs \ && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ - && rm -rf /usr/local/src/drush9/tests \ codeception: disabled: [5.2] check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' all: command: | - COMPOSER_HOME="{{ compose_home }}" composer global require codeception/codeception --dev \ + COMPOSER_HOME="{{ compose_home }}" composer global require codeception/codeception \ && ln -s {{ compose_home }}/vendor/codeception/codeception/codecept /usr/local/bin/codecept \ drupalconsole: disabled: [5.2, 5.3, 5.4] @@ -448,7 +445,7 @@ software_available: && git checkout $(git describe --abbrev=0 --tags) \ command: | chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ - && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ + && su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install --no-interaction --no-progress --no-dev' \ && ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ && rm -rf /usr/local/src/laravel-installer/laravel/.git \ linkcheck: @@ -613,9 +610,13 @@ software_available: yamllint: check: yamllint --version 2>&1 | grep -E '[.0-9]+' all: - pre: apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev - command: pip install yamllint - post: apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* + pre: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests libpython-dev python-setuptools libyaml-dev \ + command: /usr/local/bin/pip install --no-cache-dir yamllint + post: | + DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false libpython-dev python-setuptools libyaml-dev \ + && rm -rf /var/lib/apt/lists/* \ cleanup: all: command: | @@ -740,26 +741,28 @@ extensions_enabled: ### # all: is generic version of defines # 7.2: is specific version of defines -# disabled: [optional] Array of PHP versions for which to disable this module +# disabled: [optional] Array of PHP versions for which to disable this module +# already_avail: [optional] Array of PHP versions for which we don't install the module, but +# the dependencies, as it is already loaded by core # # all, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4: -# pre: [optional] Run command before anything else -# build_dep: [optional] Array of build dependencies -# run_dep: [optional] Array of run-time dependencies -# type: [required] One of 'builtin', 'pecl' or 'git' +# pre: [optional] Run command before anything else +# build_dep: [optional] Array of build dependencies +# run_dep: [optional] Array of run-time dependencies +# type: [required] One of 'builtin', 'pecl' or 'git' # # type: builtin -# configure: [optional] Add './configure' arguments +# configure: [optional] Add './configure' arguments # type: pecl -# version: [optional] Pecl packet version -# command: [optional] Overwrite pecl command (pecl install ext) +# version: [optional] Pecl packet version +# command: [optional] Overwrite pecl command (pecl install ext) # type: git -# git_url: [required] Git repository URL -# git_ref: [optional] Tag, branch, commit to checkout -# configure: [optional] Add './configure' arguments -# command: [optional] Overwrite default command (phpize && ./configure && make && make install) +# git_url: [required] Git repository URL +# git_ref: [optional] Tag, branch, commit to checkout +# configure: [optional] Add './configure' arguments +# command: [optional] Overwrite default command (phpize && ./configure && make && make install) # type: custom -# command: [required] Custom command to install and enable a module +# command: [required] Custom command to install and enable a module extensions_available: amqp: disabled: [7.3] @@ -805,9 +808,11 @@ extensions_available: all: type: builtin ctype: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin curl: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin build_dep: [libcurl4-openssl-dev] @@ -815,6 +820,7 @@ extensions_available: all: type: builtin dom: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin configure: --with-libxml-dir=/usr @@ -831,14 +837,16 @@ extensions_available: all: type: builtin fileinfo: + already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] 5.2: type: pecl build_dep: [libmagic-dev] all: type: builtin filter: - disabled: "{{ php_all_versions }}" # Available by default + already_avail: "{{ php_all_versions }}" # Available by default ftp: + already_avail: [5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin configure: --with-openssl-dir @@ -905,12 +913,17 @@ extensions_available: pre: ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ build_dep: [libgmp-dev] hash: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin iconv: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin igbinary: + 5.2: + type: pecl + version: 2.0.7 all: type: pecl imagick: @@ -973,6 +986,7 @@ extensions_available: && rm -rf ioncube \ && rm -rf ioncube.tar.gz \ json: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] 7.0: type: builtin build_dep: [bison] @@ -985,9 +999,9 @@ extensions_available: configure: --with-ldap --with-ldap-sasl build_dep: [libldap2-dev, libsasl2-dev] libxml: - disabled: "{{ php_all_versions }}" # Available by default + already_avail: "{{ php_all_versions }}" # Available by default mbstring: - disabled: [7.3] + already_avail: [5.2, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin mcrypt: @@ -1083,6 +1097,7 @@ extensions_available: all: type: pecl mysql: + already_avail: [5.2, 5.3] disabled: [7.0, 7.1, 7.2, 7.3] # Deprecated in newer versions 5.6: type: builtin @@ -1091,10 +1106,12 @@ extensions_available: type: builtin run_dep: [libmysqlclient18] mysqli: + already_avail: [5.2] all: type: builtin mysqlnd: - disabled: "{{ php_all_versions }}" # Available by default + disabled: [5.2] + already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] oci8: disabled: "{{ php_all_versions }}" # TODO: Oracle library is missing odbc: @@ -1112,15 +1129,16 @@ extensions_available: all: type: builtin openssl: - disabled: "{{ php_all_versions }}" # Available by default + already_avail: "{{ php_all_versions }}" # Available by default pcntl: all: type: builtin pcre: - disabled: "{{ php_all_versions }}" # Available by default + already_avail: "{{ php_all_versions }}" # Available by default pdo: # https://github.com/docker-library/php/issues/618 - disabled: [7.0] # TODO: Currently disabled due to bug in built + #disabled: [7.0] # TODO: Currently disabled due to bug in built + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.1, 7.2, 7.3] all: type: builtin pdo_dblib: @@ -1135,12 +1153,16 @@ extensions_available: build_dep: [libfbclient2, libib-util, firebird-dev] run_dep: [libfbclient2] pdo_mysql: + already_avail: [5.2] all: type: builtin configure: --with-zlib-dir=/usr build_dep: [zlib1g-dev] pdo_oci: disabled: "{{ php_all_versions }}" # TODO: Oracle library is missing + # disabled: [5.2] + # all: + # type: builtin pdo_odbc: disabled: "{{ php_all_versions }}" # TODO: Build errors pdo_pgsql: @@ -1149,6 +1171,7 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] pdo_sqlite: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin build_dep: [libsqlite3-dev] @@ -1183,12 +1206,14 @@ extensions_available: phar: # https://github.com/docker-library/php/issues/618 disabled: [5.6, 7.0] # TODO: Currently disabled due to bug in built + already_avail: [5.3, 5.4, 5.5, 7.1, 7.2, 7.3] 5.2: type: pecl all: type: builtin build_dep: [libssl-dev] posix: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin pspell: @@ -1197,11 +1222,13 @@ extensions_available: build_dep: [libpspell-dev] run_dep: [libaspell15] readline: - disabled: [5.2, 5.3, 5.4] # Available by default + disabled: [5.3] + already_avail: [5.2, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin build_dep: [libedit-dev, libreadline-dev] recode: + already_avail: [5.3, 5.4] all: type: builtin build_dep: [librecode-dev] @@ -1219,6 +1246,7 @@ extensions_available: build_dep: [librdkafka-dev] run_dep: [librdkafka1] session: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin configure: --with-mm @@ -1227,6 +1255,7 @@ extensions_available: all: type: builtin simplexml: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin configure: --with-libxml-dir=/usr @@ -1238,6 +1267,7 @@ extensions_available: build_dep: [libssl-dev, libsnmp-dev, snmp] run_dep: [snmp] soap: + already_avail: [5.2] all: type: builtin configure: --with-libxml-dir=/usr @@ -1247,6 +1277,7 @@ extensions_available: type: builtin sodium: disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1] + already_avail: [7.2, 7.3] all: type: builtin build_dep: [libsodium-dev] @@ -1277,7 +1308,8 @@ extensions_available: git_url: https://github.com/swoole/swoole-src git_ref: master command: | - git submodule update --init --recursive \ + git checkout $(git describe --abbrev=0 --tags) \ + && git submodule update --init --recursive \ && cd thirdparty/hiredis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ @@ -1342,6 +1374,7 @@ extensions_available: build_dep: [libtidy-dev] run_dep: [libtidy5] tokenizer: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin uploadprogress: @@ -1388,12 +1421,13 @@ extensions_available: all: type: pecl xml: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin configure: --with-libxml-dir=/usr build_dep: [libxml2-dev] xmlreader: - disabled: [7.0, 7.1, 7.2, 7.3] # Available by default + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin configure: --with-libxml-dir=/usr @@ -1404,6 +1438,7 @@ extensions_available: configure: --with-libxml-dir=/usr --with-iconv-dir=/usr build_dep: [libxml2-dev] xmlwriter: + already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: builtin configure: --with-libxml-dir=/usr