diff --git a/.ansible/group_vars/all/mods.yml b/.ansible/group_vars/all/mods.yml index c9d9941..2bb7462 100644 --- a/.ansible/group_vars/all/mods.yml +++ b/.ansible/group_vars/all/mods.yml @@ -23,6 +23,31 @@ extensions_enabled: - redis - zip - phar + - curl + - fileinfo + - gettext + - interbase + - json + - memcache + - mongo + - mysql + - mysqlnd + - oci8 + - odbc + - openssl + - pdo + - pdo_dblib + - pdo_firebird + - pdo_mysql + - pdo_oci + - pdo_odbc + - pdo_pgsql + - pdo_sqlite + - pdo_sqlsrv + - psr + - sqlite3 + - sqlsrv + - phalcon # The following specifies how modules are being built. @@ -588,3 +613,361 @@ extensions_available: 5.2: type: pecl build_dep: [libssl-dev] + curl: + disabled: [] + already_avail: "{{ php_all_versions }}" + fileinfo: + disabled: [] + already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + 5.2: + type: pecl + build_dep: [libmagic-dev] + run_dep: [libmagic1] + gettext: + disabled: [] + all: + type: builtin + interbase: + disabled: [7.4, 8.0, 8.1, 8.2] + all: + type: builtin + build_dep: [libfbclient2, libib-util, firebird-dev] + run_dep: [libfbclient2] + json: + disabled: [] + already_avail: "{{ php_all_versions }}" + memcache: + disabled: [] + all: + type: pecl + build_dep: [zlib1g-dev] + 7.4: + type: pecl + version: 4.0.5.2 + 7.3: + type: pecl + version: 4.0.5.2 + 7.2: + type: pecl + version: 4.0.5.2 + 7.1: + type: pecl + version: 4.0.5.2 + 7.0: + type: pecl + version: 4.0.5.2 + 5.6: + type: pecl + version: 2.2.7 + 5.5: + type: pecl + version: 2.2.7 + 5.4: + type: pecl + version: 2.2.7 + 5.3: + type: pecl + version: 2.2.7 + 5.2: + type: pecl + version: 2.2.7 + mongo: + disabled: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + all: + type: pecl + command: yes yes | pecl install mongo + build_dep: [libssl-dev, libsasl2-dev] + 5.2: + type: pecl + command: yes yes | pecl install mongo-1.5.8 + mysql: + disabled: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + all: + type: builtin + configure: --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" + run_dep: [libmysqlclient18] + build_dep: [libmysqlclient-dev] + 5.6: + type: builtin + run_dep: [libmariadbclient18] + build_dep: [libmariadbclient-dev] + mysqlnd: + disabled: [5.2] + already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + oci8: + disabled: [5.2] + all: + type: builtin + configure: --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} + pre: | + ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ + && ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ + )" \ + && ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ + && ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ + \ + && rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ + && curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + build_dep: [alien, libaio-dev] + run_dep: [libaio1] + post: | + ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ + && ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ + )" \ + && ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ + && ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ + && (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + odbc: + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + openssl: + disabled: [] + already_avail: "{{ php_all_versions }}" + pdo: + disabled: [] + already_avail: "{{ php_all_versions }}" + pdo_dblib: + disabled: [] + all: + type: builtin + pre: ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ + build_dep: [freetds-dev] + run_dep: [libsybdb5] + pdo_firebird: + disabled: [] + all: + type: builtin + build_dep: [libfbclient2, libib-util, firebird-dev] + run_dep: [libfbclient2] + pdo_mysql: + disabled: [] + all: + type: builtin + configure: --with-zlib-dir=/usr + run_dep: [libmariadbd19] + build_dep: [zlib1g-dev, libmariadb-dev] + 7.0: + type: builtin + run_dep: [libmariadbclient18] + build_dep: [zlib1g-dev, libmariadbclient-dev] + 5.6: + type: builtin + run_dep: [libmariadbclient18] + build_dep: [zlib1g-dev, libmariadbclient-dev] + 5.5: + type: builtin + run_dep: [libmysqlclient18] + build_dep: [zlib1g-dev, libmysqlclient-dev] + 5.4: + type: builtin + run_dep: [libmysqlclient18] + build_dep: [zlib1g-dev, libmysqlclient-dev] + 5.3: + type: builtin + run_dep: [libmysqlclient18] + build_dep: [zlib1g-dev, libmysqlclient-dev] + 5.2: + type: builtin + run_dep: [libmysqlclient18] + build_dep: [zlib1g-dev, libmysqlclient-dev] + pdo_oci: + disabled: [5.2, 5.3, 5.4, 5.5, 5.6] + all: + type: builtin + configure: --with-pdo-oci=instantclient,/usr,${ORACLE_VERSION_MAJOR} + pre: | + ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ + && ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ + )" \ + && ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ + && ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ + \ + && rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ + && curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + && (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + build_dep: [alien] + 8.2: + type: builtin + configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} + 8.1: + type: builtin + configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} + 8.0: + type: builtin + configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} + 7.4: + type: builtin + configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} + 7.3: + type: builtin + configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} + 7.2: + type: builtin + configure: --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} + pdo_odbc: + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2] + pdo_pgsql: + disabled: [] + all: + type: builtin + build_dep: [libpq-dev] + run_dep: [libpq5] + pdo_sqlite: + disabled: [] + already_avail: "{{ php_all_versions }}" + pdo_sqlsrv: + disabled: [5.2, 5.3, 5.4, 5.5, 5.6] + all: + type: pecl + build_dep: [unixodbc-dev] + run_dep: [unixodbc] + 7.3: + type: pecl + version: 5.9.0 + 7.2: + type: pecl + version: 5.8.1 + 7.1: + type: pecl + version: 5.6.1 + 7.0: + type: pecl + version: 5.3.0 + psr: + disabled: [5.2, 5.3] + all: + type: pecl + 7.2: + type: pecl + version: 1.1.0 + 7.1: + type: pecl + version: 1.1.0 + 7.0: + type: pecl + version: 1.1.0 + 5.6: + type: pecl + version: 0.6.0 # NOTE: 0.6.1 fails with: Package "psr" Version "0.6.1" does not have REST xml available + 5.5: + type: pecl + version: 0.5.1 + 5.4: + type: pecl + version: 0.5.1 + sqlite3: + disabled: [5.2] + already_avail: "{{ php_all_versions }}" + sqlsrv: + disabled: [5.2, 5.3, 5.4, 5.5, 5.6] + all: + type: pecl + build_dep: [unixodbc-dev] + run_dep: [unixodbc] + 7.3: + type: pecl + version: 5.9.0 + 7.2: + type: pecl + version: 5.8.1 + 7.1: + type: pecl + version: 5.6.1 + 7.0: + type: pecl + version: 5.3.0 + phalcon: + disabled: [5.2, 8.2] + all: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: | + $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags \ + | sort -V \ + | sed 's/^.*tags\///g' \ + | grep -E '^v[.0-9]+$' \ + | tail -1 \ + ) \ + command: cd build && ./install + build_dep: [libpcre3-dev, re2c] + run_dep: [] + 7.3: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: v4.1.2 + command: cd build && ./install + 7.2: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: v4.1.1 + command: cd build && ./install + 7.1: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: v3.4.4 + command: cd build && ./install + 7.0: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: v3.4.4 + command: cd build && ./install + 5.6: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: v3.4.4 + command: cd build && ./install + 5.5: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: v3.4.4 + command: cd build && ./install + 5.4: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: phalcon-v2.0.13 + command: cd build && ./install + 5.3: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: phalcon-v2.0.9 + command: cd build && ./install diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 index 49ccccc..10475ad 100644 --- a/Dockerfiles/mods/Dockerfile-5.2 +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -9,14 +9,20 @@ FROM devilbox/php-fpm:5.2-base as builder RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ + firebird-dev \ + freetds-dev \ libenchant-dev \ libevent-dev \ + libfbclient2 \ libfreetype6-dev \ + libib-util \ libjpeg-dev \ + libmagic-dev \ libmemcached-dev \ libmysqlclient-dev \ libpng-dev \ libpq-dev \ + libsasl2-dev \ libssl-dev \ libvpx-dev \ libwebp-dev \ @@ -195,6 +201,102 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: fileinfo -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install fileinfo \ + # Enabling + && docker-php-ext-enable fileinfo \ + && true + + +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install memcache-2.2.7 \ + # Enabling + && docker-php-ext-enable memcache \ + && true + + +# -------------------- Installing PHP Extension: mongo -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Custom: Pecl command + && yes yes | pecl install mongo-1.5.8 \ + # Enabling + && docker-php-ext-enable mongo \ + && true + + +# -------------------- Installing PHP Extension: mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_mysql -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Default: configure command + && docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ + && true + + # Fix php.ini settings for enabled extensions @@ -244,12 +346,15 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ libenchant1c2a \ libevent-2.0-5 \ + libfbclient2 \ libfreetype6 \ libjpeg62-turbo \ + libmagic1 \ libmemcachedutil2 \ libmysqlclient18 \ libpng12-0 \ libpq5 \ + libsybdb5 \ libvpx1 \ libwebp5 \ libxpm4 \ @@ -319,6 +424,36 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ + && php -m | grep -oiE '^curl$' \ + && php-fpm -m | grep -oiE '^curl$' \ + && php -m | grep -oiE '^fileinfo$' \ + && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^gettext$' \ + && php-fpm -m | grep -oiE '^gettext$' \ + && php -m | grep -oiE '^interbase$' \ + && php-fpm -m | grep -oiE '^interbase$' \ + && php -m | grep -oiE '^json$' \ + && php-fpm -m | grep -oiE '^json$' \ + && php -m | grep -oiE '^memcache$' \ + && php-fpm -m | grep -oiE '^memcache$' \ + && php -m | grep -oiE '^mongo$' \ + && php-fpm -m | grep -oiE '^mongo$' \ + && php -m | grep -oiE '^mysql$' \ + && php-fpm -m | grep -oiE '^mysql$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ + && 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$' \ + && php-fpm -m | grep -oiE '^pdo_firebird$' \ + && php -m | grep -oiE '^pdo_mysql$' \ + && php-fpm -m | grep -oiE '^pdo_mysql$' \ + && php -m | grep -oiE '^pdo_pgsql$' \ + && php-fpm -m | grep -oiE '^pdo_pgsql$' \ + && php -m | grep -oiE '^pdo_sqlite$' \ + && php-fpm -m | grep -oiE '^pdo_sqlite$' \ && true diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index 42fa72c..2a20366 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -9,12 +9,19 @@ FROM devilbox/php-fpm:5.3-base as builder RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ libenchant-dev \ libevent-dev \ + libfbclient2 \ libfreetype6-dev \ + libib-util \ libjpeg-dev \ libmemcached-dev \ libmysqlclient-dev \ + libpcre3-dev \ libpng-dev \ libpq-dev \ libsasl2-dev \ @@ -23,6 +30,7 @@ RUN set -eux \ libwebp-dev \ libxpm-dev \ libzip-dev \ + re2c \ zlib1g-dev \ # Build tools autoconf \ @@ -204,6 +212,157 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install memcache-2.2.7 \ + # Enabling + && docker-php-ext-enable memcache \ + && true + + +# -------------------- Installing PHP Extension: mongo -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && yes yes | pecl install mongo \ + # Enabling + && docker-php-ext-enable mongo \ + && true + + +# -------------------- Installing PHP Extension: mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command + && ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ +&& ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ +)" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ + # Generic post-command + && ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ +&& ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ +)" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_mysql -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Default: configure command + && docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ + && true + + +# -------------------- Installing PHP Extension: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout phalcon-v2.0.9 \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + # Fix php.ini settings for enabled extensions @@ -251,14 +410,17 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.3-mods" RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ + libaio1 \ libenchant1c2a \ libevent-2.0-5 \ + libfbclient2 \ libfreetype6 \ libjpeg62-turbo \ libmemcachedutil2 \ libmysqlclient18 \ libpng12-0 \ libpq5 \ + libsybdb5 \ libvpx1 \ libwebp5 \ libxpm4 \ @@ -284,6 +446,23 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/ ### ### Post Install executions ### +RUN set -eux \ + # ---------- oci8 ---------- + && ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ +&& ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ +)" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + ### ### Verify ### @@ -333,6 +512,44 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ + && php -m | grep -oiE '^curl$' \ + && php-fpm -m | grep -oiE '^curl$' \ + && php -m | grep -oiE '^fileinfo$' \ + && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^gettext$' \ + && php-fpm -m | grep -oiE '^gettext$' \ + && php -m | grep -oiE '^interbase$' \ + && php-fpm -m | grep -oiE '^interbase$' \ + && php -m | grep -oiE '^json$' \ + && php-fpm -m | grep -oiE '^json$' \ + && php -m | grep -oiE '^memcache$' \ + && php-fpm -m | grep -oiE '^memcache$' \ + && php -m | grep -oiE '^mongo$' \ + && php-fpm -m | grep -oiE '^mongo$' \ + && php -m | grep -oiE '^mysql$' \ + && php-fpm -m | grep -oiE '^mysql$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ + && php -m | grep -oiE '^oci8$' \ + && php-fpm -m | grep -oiE '^oci8$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ + && 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$' \ + && php-fpm -m | grep -oiE '^pdo_firebird$' \ + && php -m | grep -oiE '^pdo_mysql$' \ + && php-fpm -m | grep -oiE '^pdo_mysql$' \ + && php -m | grep -oiE '^pdo_pgsql$' \ + && php-fpm -m | grep -oiE '^pdo_pgsql$' \ + && php -m | grep -oiE '^pdo_sqlite$' \ + && php-fpm -m | grep -oiE '^pdo_sqlite$' \ + && php -m | grep -oiE '^sqlite3$' \ + && php-fpm -m | grep -oiE '^sqlite3$' \ + && php -m | grep -oiE '^phalcon$' \ + && php-fpm -m | grep -oiE '^phalcon$' \ && true diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index c65f26d..4a8efc6 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -9,12 +9,19 @@ FROM devilbox/php-fpm:5.4-base as builder RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ libenchant-dev \ libevent-dev \ + libfbclient2 \ libfreetype6-dev \ + libib-util \ libjpeg-dev \ libmemcached-dev \ libmysqlclient-dev \ + libpcre3-dev \ libpng-dev \ libpq-dev \ libsasl2-dev \ @@ -23,6 +30,7 @@ RUN set -eux \ libwebp-dev \ libxpm-dev \ libzip-dev \ + re2c \ zlib1g-dev \ # Build tools autoconf \ @@ -204,6 +212,168 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install memcache-2.2.7 \ + # Enabling + && docker-php-ext-enable memcache \ + && true + + +# -------------------- Installing PHP Extension: mongo -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && yes yes | pecl install mongo \ + # Enabling + && docker-php-ext-enable mongo \ + && true + + +# -------------------- Installing PHP Extension: mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command + && ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ +&& ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ +)" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ + # Generic post-command + && ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ +&& ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ +)" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_mysql -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Default: configure command + && docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ + && true + + +# -------------------- Installing PHP Extension: psr -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install psr-0.5.1 \ + # Enabling + && docker-php-ext-enable psr \ + && true + + +# -------------------- Installing PHP Extension: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout phalcon-v2.0.13 \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + # Fix php.ini settings for enabled extensions @@ -251,14 +421,17 @@ LABEL "org.opencontainers.image.description"="PHP-FPM 5.4-mods" RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ + libaio1 \ libenchant1c2a \ libevent-2.0-5 \ + libfbclient2 \ libfreetype6 \ libjpeg62-turbo \ libmemcachedutil2 \ libmysqlclient18 \ libpng12-0 \ libpq5 \ + libsybdb5 \ libvpx1 \ libwebp5 \ libxpm4 \ @@ -284,6 +457,23 @@ COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/ ### ### Post Install executions ### +RUN set -eux \ + # ---------- oci8 ---------- + && ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ +&& ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ +)" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + ### ### Verify ### @@ -333,6 +523,46 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^zip$' \ && php -m | grep -oiE '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ + && php -m | grep -oiE '^curl$' \ + && php-fpm -m | grep -oiE '^curl$' \ + && php -m | grep -oiE '^fileinfo$' \ + && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^gettext$' \ + && php-fpm -m | grep -oiE '^gettext$' \ + && php -m | grep -oiE '^interbase$' \ + && php-fpm -m | grep -oiE '^interbase$' \ + && php -m | grep -oiE '^json$' \ + && php-fpm -m | grep -oiE '^json$' \ + && php -m | grep -oiE '^memcache$' \ + && php-fpm -m | grep -oiE '^memcache$' \ + && php -m | grep -oiE '^mongo$' \ + && php-fpm -m | grep -oiE '^mongo$' \ + && php -m | grep -oiE '^mysql$' \ + && php-fpm -m | grep -oiE '^mysql$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ + && php -m | grep -oiE '^oci8$' \ + && php-fpm -m | grep -oiE '^oci8$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ + && 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$' \ + && php-fpm -m | grep -oiE '^pdo_firebird$' \ + && php -m | grep -oiE '^pdo_mysql$' \ + && php-fpm -m | grep -oiE '^pdo_mysql$' \ + && php -m | grep -oiE '^pdo_pgsql$' \ + && php-fpm -m | grep -oiE '^pdo_pgsql$' \ + && php -m | grep -oiE '^pdo_sqlite$' \ + && php-fpm -m | grep -oiE '^pdo_sqlite$' \ + && php -m | grep -oiE '^psr$' \ + && php-fpm -m | grep -oiE '^psr$' \ + && php -m | grep -oiE '^sqlite3$' \ + && php-fpm -m | grep -oiE '^sqlite3$' \ + && php -m | grep -oiE '^phalcon$' \ + && php-fpm -m | grep -oiE '^phalcon$' \ && true diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index c427fdf..64d7672 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -9,14 +9,21 @@ FROM devilbox/php-fpm:5.5-base as builder RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ ghostscript \ + libaio-dev \ libenchant-dev \ libevent-dev \ + libfbclient2 \ libfreetype6-dev \ + libib-util \ libjpeg-dev \ libmagickwand-dev \ libmemcached-dev \ libmysqlclient-dev \ + libpcre3-dev \ libpng-dev \ libpq-dev \ libsasl2-dev \ @@ -25,6 +32,7 @@ RUN set -eux \ libwebp-dev \ libxpm-dev \ libzip-dev \ + re2c \ zlib1g-dev \ # Build tools autoconf \ @@ -228,6 +236,168 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && true + + +# -------------------- Installing PHP Extension: interbase -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && true + + +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install memcache-2.2.7 \ + # Enabling + && docker-php-ext-enable memcache \ + && true + + +# -------------------- Installing PHP Extension: mongo -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && yes yes | pecl install mongo \ + # Enabling + && docker-php-ext-enable mongo \ + && true + + +# -------------------- Installing PHP Extension: mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure mysql --with-mysql --with-mysql-sock --with-zlib-dir=/usr --with-libdir="/lib/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command + && ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ +&& ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ +)" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& curl -sS -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& alien \ + -v \ + --target=$( dpkg --print-architecture ) \ + -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.${ARCH}.rpm \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ + # Generic post-command + && ARCH="$(dpkg-architecture --query DEB_HOST_GNU_CPU)" \ +&& ORACLE_HREF="$( \ + curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/${ARCH}/ \ + | tac \ + | tac \ + | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' \ + | tail -1 \ +)" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_mysql -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: Built-in extension + # Default: configure command + && docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ + && true + + +# -------------------- Installing PHP Extension: psr -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install psr-0.5.1 \ + # Enabling + && docker-php-ext-enable psr \ + && true + + +# -------------------- Installing PHP Extension: phalcon -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout v3.4.4 \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + # Fix php.ini settings for enabled extensions @@ -276,8 +446,10 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests \ ghostscript \ + libaio1 \ libenchant1c2a \ libevent-2.0-5 \ + libfbclient2 \ libfreetype6 \ libjpeg62-turbo \ libmagickwand-6.q16-2 \ @@ -285,6 +457,7 @@ RUN set -eux \ libmysqlclient18 \ libpng12-0 \ libpq5 \ + libsybdb5 \ libvpx1 \ libwebp5 \ libxpm4 \ @@ -321,6 +494,19 @@ RUN set -eux \ && sed -i'' 's|.*