From 40d76f355f669908f14677ba1a30556c6c66ac1e Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 28 Dec 2019 15:59:15 +0100 Subject: [PATCH] Use official PHP 7.4 image --- Dockerfiles/base/Dockerfile-7.4 | 2 +- Dockerfiles/mods/Dockerfile-7.3 | 13 +++ Dockerfiles/mods/Dockerfile-7.4 | 99 ++++++++++++++++++-- README.md | 4 +- build/ansible/DOCKERFILES/Dockerfile-base.j2 | 2 - build/ansible/group_vars/all/mods.yml | 20 ++-- 6 files changed, 122 insertions(+), 18 deletions(-) diff --git a/Dockerfiles/base/Dockerfile-7.4 b/Dockerfiles/base/Dockerfile-7.4 index af85e85f..c6606593 100644 --- a/Dockerfiles/base/Dockerfile-7.4 +++ b/Dockerfiles/base/Dockerfile-7.4 @@ -1,5 +1,5 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. -FROM devilbox/php-fpm-7.4 +FROM php:7.4-fpm MAINTAINER "cytopia" diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index 7b830403..94cbf31b 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -287,6 +287,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install memcache \ + # Enabling + && docker-php-ext-enable memcache \ + && true + + # -------------------- Installing PHP Extension: memcached -------------------- RUN set -eux \ # Installation: Generic @@ -871,6 +882,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^mcrypt$' \ && php -m | grep -oiE '^msgpack$' \ && php-fpm -m | grep -oiE '^msgpack$' \ + && php -m | grep -oiE '^memcache$' \ + && php-fpm -m | grep -oiE '^memcache$' \ && php -m | grep -oiE '^memcached$' \ && php-fpm -m | grep -oiE '^memcached$' \ && php -m | grep -oiE '^mongodb$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index a4df71c5..e252e467 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -30,6 +30,7 @@ RUN set -eux \ libmcrypt-dev \ libmemcached-dev \ libnghttp2-dev \ + libpcre3-dev \ libpng-dev \ libpq-dev \ libpspell-dev \ @@ -77,6 +78,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: apcu -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install apcu \ + # Enabling + && docker-php-ext-enable apcu \ + && true + + # -------------------- Installing PHP Extension: bcmath -------------------- RUN set -eux \ # Installation: Generic @@ -85,6 +97,20 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: blackfire -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Custom extension + && version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \ +&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \ +&& mkdir -p /tmp/blackfire \ +&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \ +&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \ +&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \ + \ + && true + + # -------------------- Installing PHP Extension: bz2 -------------------- RUN set -eux \ # Installation: Generic @@ -237,6 +263,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: memcache -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install memcache \ + # Enabling + && docker-php-ext-enable memcache \ + && true + + # -------------------- Installing PHP Extension: memcached -------------------- RUN set -eux \ # Installation: Version specific @@ -271,6 +308,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: oauth -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install oauth \ + # Enabling + && docker-php-ext-enable oauth \ + && true + + # -------------------- Installing PHP Extension: oci8 -------------------- RUN set -eux \ # Generic pre-command @@ -389,6 +437,32 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: psr -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install psr \ + # Enabling + && docker-php-ext-enable psr \ + && true + + +# -------------------- Installing PHP Extension: phalcon -------------------- +RUN set -eux \ + # Installation: Generic + # Type: GIT extension + && git clone https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + # Custom: Branch + && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep -E '^v[.0-9]+$' | tail -1) \ + # Custom: Install command + && cd build && ./install \ + # Enabling + && docker-php-ext-enable phalcon \ + && true + + # -------------------- Installing PHP Extension: pspell -------------------- RUN set -eux \ # Installation: Generic @@ -448,10 +522,9 @@ RUN set -eux \ # -------------------- Installing PHP Extension: soap -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension - # Custom: configure command - && docker-php-ext-configure soap --with-libxml-dir=/usr \ + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ && true @@ -549,10 +622,11 @@ RUN set -eux \ # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension # Custom: configure command - && docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ + && docker-php-ext-configure xmlrpc --with-iconv-dir=/usr \ + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ && true @@ -567,10 +641,11 @@ RUN set -eux \ # -------------------- Installing PHP Extension: zip -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension # Custom: configure command - && docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \ + && docker-php-ext-configure zip --with-zip \ + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ && true @@ -697,6 +772,8 @@ RUN set -eux \ \ && php -m | grep -oiE '^amqp$' \ && php-fpm -m | grep -oiE '^amqp$' \ + && php -m | grep -oiE '^apcu$' \ + && php-fpm -m | grep -oiE '^apcu$' \ && php -m | grep -oiE '^bcmath$' \ && php-fpm -m | grep -oiE '^bcmath$' \ && php -m | grep -oiE '^bz2$' \ @@ -751,6 +828,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^mcrypt$' \ && php -m | grep -oiE '^msgpack$' \ && php-fpm -m | grep -oiE '^msgpack$' \ + && php -m | grep -oiE '^memcache$' \ + && php-fpm -m | grep -oiE '^memcache$' \ && php -m | grep -oiE '^memcached$' \ && php-fpm -m | grep -oiE '^memcached$' \ && php -m | grep -oiE '^mongodb$' \ @@ -759,6 +838,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^mysqli$' \ && php -m | grep -oiE '^mysqlnd$' \ && php-fpm -m | grep -oiE '^mysqlnd$' \ + && php -m | grep -oiE '^oauth$' \ + && php-fpm -m | grep -oiE '^oauth$' \ && php -m | grep -oiE '^oci8$' \ && php-fpm -m | grep -oiE '^oci8$' \ && php -m | grep -oiE '^Zend Opcache$' \ @@ -785,6 +866,10 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^pdo_sqlite$' \ && php -m | grep -oiE '^pgsql$' \ && php-fpm -m | grep -oiE '^pgsql$' \ + && php -m | grep -oiE '^psr$' \ + && php-fpm -m | grep -oiE '^psr$' \ + && php -m | grep -oiE '^phalcon$' \ + && php-fpm -m | grep -oiE '^phalcon$' \ && php -m | grep -oiE '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ && php -m | grep -oiE '^posix$' \ diff --git a/README.md b/README.md index db983389..544b8ac7 100644 --- a/README.md +++ b/README.md @@ -642,12 +642,12 @@ Check out this table to see which Docker image provides what PHP modules. 7.3 Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 7.4 Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, intl, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 8.0 diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 25b8eb56..2a70b883 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -3,8 +3,6 @@ FROM devilbox/php-fpm-5.2 {% elif php_version == 5.3 %} FROM devilbox/php-fpm-5.3 -{% elif php_version == 7.4 %} -FROM devilbox/php-fpm-7.4 {% elif php_version == 8.0 %} FROM devilbox/php-fpm-8.0 {% else %} diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index 760fff56..10e25285 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -162,7 +162,7 @@ extensions_available: build_dep: [librabbitmq-dev] run_dep: [librabbitmq4] apcu: - disabled: [5.2, 7.4, 8.0] + disabled: [5.2, 8.0] 5.3: type: pecl version: 4.0.11 @@ -181,7 +181,7 @@ extensions_available: all: type: builtin blackfire: - disabled: [5.2, 5.3, 5.4, 5.5, 7.4, 8.0] + disabled: [5.2, 5.3, 5.4, 5.5, 8.0] all: type: custom command: | @@ -430,7 +430,7 @@ extensions_available: run_dep: [libmcrypt4] build_dep: [libmcrypt-dev] memcache: - disabled: [7.3, 7.4, 8.0] + disabled: [8.0] 5.2: type: pecl version: 2.2.7 @@ -578,7 +578,7 @@ extensions_available: 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] oauth: - disabled: [7.4, 8.0] + disabled: [8.0] 5.2: type: pecl version: 1.2.3 @@ -722,7 +722,7 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] psr: - disabled: [5.2, 5.3, 7.4, 8.0] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module + disabled: [5.2, 5.3, 8.0] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module 5.4: type: pecl version: 0.5.1 @@ -735,7 +735,7 @@ extensions_available: all: type: pecl phalcon: - disabled: [5.2, 7.4, 8.0] # TODO: currently disabled for 7.4 as it breaks + disabled: [5.2, 8.0] # TODO: currently disabled for 7.4 as it breaks 5.3: type: git git_url: https://github.com/phalcon/cphalcon @@ -879,6 +879,8 @@ extensions_available: run_dep: [snmp] soap: already_avail: [5.2] + 7.4: + type: builtin all: type: builtin configure: --with-libxml-dir=/usr @@ -1063,6 +1065,9 @@ extensions_available: xmlreader: already_avail: "{{ php_all_versions }}" xmlrpc: + 7.4: + type: builtin + configure: --with-iconv-dir=/usr all: type: builtin configure: --with-libxml-dir=/usr --with-iconv-dir=/usr @@ -1095,6 +1100,9 @@ extensions_available: configure: --with-zlib-dir=/usr --with-pcre-dir=/usr build_dep: [zlib1g-dev] run_dep: [] + 7.4: + type: builtin + configure: --with-zip all: type: builtin configure: --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip