From bd3585596fa6657f3f0e86a2450db06c3e4766fe Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 28 Dec 2018 14:47:49 +0100 Subject: [PATCH 1/8] Ensure to reflect available modules even if disabled by default --- README.md | 16 ++++++++-------- build/gen-readme.sh | 6 ++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9b7978e0..7cf95cfe 100644 --- a/README.md +++ b/README.md @@ -526,42 +526,42 @@ Check out this table to see which Docker image provides what PHP modules. 5.2 ctype, curl, date, dom, filter, hash, iconv, json, libxml, mbstring, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, posix, readline, Reflection, session, SimpleXML, soap, SPL, SQLite, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, igbinary, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, msgpack, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, bcmath, bz2, calendar, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, igbinary, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, msgpack, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 5.3 Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysql, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 5.4 Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 5.5 Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 5.6 Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mhash, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mhash, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 7.0 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, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, 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, 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, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 7.1 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, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - amqp, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, 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, 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, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib 7.2 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, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, 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, 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, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, 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.3 diff --git a/build/gen-readme.sh b/build/gen-readme.sh index 1a974888..2bdb7c25 100755 --- a/build/gen-readme.sh +++ b/build/gen-readme.sh @@ -35,9 +35,15 @@ get_modules() { # Retrieve all modules PHP_MODULES="$( docker run -it --entrypoint=php devilbox/php-fpm:${tag} -m )" + ALL_MODULES= + + if docker run -it --entrypoint=find devilbox/php-fpm:${tag} /usr/local/lib/php/extensions -name 'ioncube.so' | grep -q ioncube.so; then + ALL_MODULES="ioncube"; + fi # Process module string into correct format for README.md PHP_MODULES="$( echo "${PHP_MODULES}" | sed 's/^\[.*//g' )" # Remove PHP Modules headlines + PHP_MODULES="${ALL_MODULES}${PHP_MODULES}" # Append all available modules PHP_MODULES="$( echo "${PHP_MODULES}" | sort -fu )" # Unique PHP_MODULES="$( echo "${PHP_MODULES}" | sed '/^\s*$/d' )" # Remove empty lines PHP_MODULES="$( echo "${PHP_MODULES}" | tr '\r\n' ',' )" # Newlines to commas From f0bc16ef5f9095e733be4b6210ff0e62b2693bed Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 28 Dec 2018 14:49:21 +0100 Subject: [PATCH 2/8] Clean up build files --- Dockerfiles/mods/Dockerfile-5.2 | 2 + Dockerfiles/mods/Dockerfile-5.3 | 9 +++ Dockerfiles/mods/Dockerfile-5.4 | 2 + Dockerfiles/mods/Dockerfile-5.5 | 2 + Dockerfiles/mods/Dockerfile-5.6 | 4 ++ Dockerfiles/mods/Dockerfile-7.0 | 11 ++-- Dockerfiles/mods/Dockerfile-7.1 | 4 +- Dockerfiles/mods/Dockerfile-7.2 | 4 +- Dockerfiles/mods/Dockerfile-7.3 | 15 +++-- Dockerfiles/mods/Dockerfile-7.4 | 2 + README.md | 2 +- build/ansible/group_vars/all.yml | 104 +++++++------------------------ 12 files changed, 66 insertions(+), 95 deletions(-) diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 index 9d23652e..56acb603 100644 --- a/Dockerfiles/mods/Dockerfile-5.2 +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -499,6 +499,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^soap$' \ && php -m | grep -oiE '^sockets$' \ && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^sysvmsg$' \ && php-fpm -m | grep -oiE '^sysvmsg$' \ && php -m | grep -oiE '^sysvsem$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index 565f8edb..74ac4eec 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -300,6 +300,11 @@ RUN set -x \ && (rm -rf /usr/local/lib/php/test/phalcon || true) \ && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ \ +# ---- Installing PHP Extension: phar ---- + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) phar \ + && (rm -rf /usr/local/lib/php/test/phar || true) \ + && (rm -rf /usr/local/lib/php/doc/phar || true) \ + \ # ---- Installing PHP Extension: pspell ---- && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ && (rm -rf /usr/local/lib/php/test/pspell || true) \ @@ -539,6 +544,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$' \ @@ -559,6 +566,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^soap$' \ && php -m | grep -oiE '^sockets$' \ && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^swoole$' \ && php-fpm -m | grep -oiE '^swoole$' \ && php -m | grep -oiE '^sysvmsg$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index fc5df40e..edbf998d 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -566,6 +566,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^soap$' \ && php -m | grep -oiE '^sockets$' \ && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^swoole$' \ && php-fpm -m | grep -oiE '^swoole$' \ && php -m | grep -oiE '^sysvmsg$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index cd938b71..4b325c9b 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -560,6 +560,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^soap$' \ && php -m | grep -oiE '^sockets$' \ && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^swoole$' \ && php-fpm -m | grep -oiE '^swoole$' \ && php -m | grep -oiE '^sysvmsg$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index 4e358d32..7b9eb42c 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -536,6 +536,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^pgsql$' \ && 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$' \ && php-fpm -m | grep -oiE '^posix$' \ && php -m | grep -oiE '^pspell$' \ @@ -562,6 +564,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^soap$' \ && php -m | grep -oiE '^sockets$' \ && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^swoole$' \ && php-fpm -m | grep -oiE '^swoole$' \ && php -m | grep -oiE '^sysvmsg$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 3c95622c..44493918 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -231,7 +231,7 @@ RUN set -x \ && (rm -rf /usr/local/lib/php/doc/memcache || true) \ \ # ---- Installing PHP Extension: memcached ---- - && pecl install memcached-3.0.4 \ + && 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) \ @@ -257,11 +257,6 @@ RUN set -x \ && (rm -rf /usr/local/lib/php/test/pcntl || true) \ && (rm -rf /usr/local/lib/php/doc/pcntl || true) \ \ -# ---- Installing PHP Extension: pdo ---- - && /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) \ - \ # ---- Installing PHP Extension: pdo_dblib ---- && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ @@ -551,6 +546,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^pgsql$' \ && 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$' \ && php-fpm -m | grep -oiE '^posix$' \ && php -m | grep -oiE '^pspell$' \ @@ -577,6 +574,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^soap$' \ && php -m | grep -oiE '^sockets$' \ && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^sqlsrv$' \ && php-fpm -m | grep -oiE '^sqlsrv$' \ && php -m | grep -oiE '^swoole$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index 8de5acf0..8ee6f9b9 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -231,7 +231,7 @@ RUN set -x \ && (rm -rf /usr/local/lib/php/doc/memcache || true) \ \ # ---- Installing PHP Extension: memcached ---- - && pecl install memcached-3.0.4 \ + && 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) \ @@ -574,6 +574,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^soap$' \ && php -m | grep -oiE '^sockets$' \ && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^sqlsrv$' \ && php-fpm -m | grep -oiE '^sqlsrv$' \ && php -m | grep -oiE '^swoole$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index 5594b4f2..bc7de877 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -232,7 +232,7 @@ RUN set -x \ && (rm -rf /usr/local/lib/php/doc/memcache || true) \ \ # ---- Installing PHP Extension: memcached ---- - && pecl install memcached-3.0.4 \ + && 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) \ @@ -577,6 +577,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^sockets$' \ && php -m | grep -oiE '^sodium$' \ && php-fpm -m | grep -oiE '^sodium$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^sqlsrv$' \ && php-fpm -m | grep -oiE '^sqlsrv$' \ && php -m | grep -oiE '^swoole$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index d633f843..b09bf877 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -187,11 +187,14 @@ RUN set -x \ && (rm -rf /usr/local/lib/php/test/ldap || true) \ && (rm -rf /usr/local/lib/php/doc/ldap || true) \ \ +# ---- Installing PHP Extension: msgpack ---- + && 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) \ + \ # ---- Installing PHP Extension: memcached ---- - && git clone 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 \ + && 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) \ @@ -477,6 +480,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ + && php -m | grep -oiE '^msgpack$' \ + && php-fpm -m | grep -oiE '^msgpack$' \ && php -m | grep -oiE '^memcached$' \ && php-fpm -m | grep -oiE '^memcached$' \ && php -m | grep -oiE '^mongodb$' \ @@ -541,6 +546,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^sockets$' \ && php -m | grep -oiE '^sodium$' \ && php-fpm -m | grep -oiE '^sodium$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^sqlsrv$' \ && php-fpm -m | grep -oiE '^sqlsrv$' \ && php -m | grep -oiE '^swoole$' \ diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index 70b8a443..d472a70a 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -499,6 +499,8 @@ RUN set -x \ && php-fpm -m | grep -oiE '^sockets$' \ && php -m | grep -oiE '^sodium$' \ && php-fpm -m | grep -oiE '^sodium$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^swoole$' \ && php-fpm -m | grep -oiE '^swoole$' \ && php -m | grep -oiE '^sysvmsg$' \ diff --git a/README.md b/README.md index 7cf95cfe..26e4dcbb 100644 --- a/README.md +++ b/README.md @@ -566,7 +566,7 @@ 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 - apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, 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 + apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, memcached, mongodb, msgpack, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, 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 diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 12d4eca8..81bf8ca1 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -828,23 +828,14 @@ 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, 7.4] - all: - type: builtin + already_avail: "{{ php_all_versions }}" curl: - already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] - all: - type: builtin - build_dep: [libcurl4-openssl-dev] + already_avail: "{{ php_all_versions }}" dba: all: type: builtin dom: - already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] - all: - type: builtin - configure: --with-libxml-dir=/usr - build_dep: [libxml2-dev] + already_avail: "{{ php_all_versions }}" enchant: 5.2: type: pecl @@ -936,13 +927,9 @@ 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, 7.4] - all: - type: builtin + already_avail: "{{ php_all_versions }}" iconv: - already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] - all: - type: builtin + already_avail: "{{ php_all_versions }}" igbinary: 5.2: type: pecl @@ -1009,12 +996,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.4] - 7.0: - type: builtin - build_dep: [bison] - all: - type: builtin + already_avail: "{{ php_all_versions }}" ldap: all: type: builtin @@ -1072,11 +1054,6 @@ extensions_available: 5.6: type: pecl version: 2.2.0 - 7.3: - type: git - git_url: https://github.com/php-memcached-dev/php-memcached - git_ref: master - command: phpize && ./configure --enable-memcached && make -j$(getconf _NPROCESSORS_ONLN) && make install 7.4: type: git git_url: https://github.com/php-memcached-dev/php-memcached @@ -1084,7 +1061,7 @@ extensions_available: command: phpize && ./configure --enable-memcached && make -j$(getconf _NPROCESSORS_ONLN) && make install all: type: pecl - version: 3.0.4 + #version: 3.0.4 # TODO: check if this version works build_dep: [zlib1g-dev, libmemcached-dev, libevent-dev] run_dep: [libmemcachedutil2] mongo: @@ -1108,7 +1085,7 @@ extensions_available: type: pecl build_dep: [libssl-dev, libsasl2-dev] msgpack: - disabled: [7.3, 7.4] + disabled: [7.4] 5.2: type: pecl version: 0.5.7 @@ -1159,18 +1136,14 @@ extensions_available: all: type: builtin openssl: - already_avail: "{{ php_all_versions }}" # Available by default + already_avail: "{{ php_all_versions }}" pcntl: all: type: builtin pcre: - already_avail: "{{ php_all_versions }}" # Available by default + already_avail: "{{ php_all_versions }}" pdo: - # https://github.com/docker-library/php/issues/618 - #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, 7.4] - all: - type: builtin + already_avail: "{{ php_all_versions }}" pdo_dblib: all: type: builtin @@ -1201,10 +1174,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, 7.4] - all: - type: builtin - build_dep: [libsqlite3-dev] + already_avail: "{{ php_all_versions }}" pdo_sqlsrv: disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.4] 7.3: @@ -1259,29 +1229,21 @@ extensions_available: git_ref: $(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) command: cd build && ./install 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, 7.4] + already_avail: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] 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, 7.4] - all: - type: builtin + already_avail: "{{ php_all_versions }}" pspell: all: type: builtin build_dep: [libpspell-dev] run_dep: [libaspell15] readline: - disabled: [5.3] - already_avail: [5.2, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] - all: - type: builtin - build_dep: [libedit-dev, libreadline-dev] + already_avail: "{{ php_all_versions }}" recode: already_avail: [5.3, 5.4] all: @@ -1315,20 +1277,12 @@ 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, 7.4] - all: - type: builtin - configure: --with-mm - build_dep: [libmm-dev] + already_avail: "{{ php_all_versions }}" shmop: all: type: builtin simplexml: - already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] - all: - type: builtin - configure: --with-libxml-dir=/usr - build_dep: [libxml2-dev] + already_avail: "{{ php_all_versions }}" snmp: all: type: builtin @@ -1351,7 +1305,7 @@ extensions_available: type: builtin build_dep: [libsodium-dev] spl: - disabled: "{{ php_all_versions }}" # TODO: Did not work + already_avail: "{{ php_all_versions }}" sqlsrv: disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.4] 7.3: @@ -1445,9 +1399,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, 7.4] - all: - type: builtin + already_avail: "{{ php_all_versions }}" uploadprogress: 7.0: type: git @@ -1499,28 +1451,16 @@ 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, 7.4] - all: - type: builtin - configure: --with-libxml-dir=/usr - build_dep: [libxml2-dev] + already_avail: "{{ php_all_versions }}" xmlreader: - already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] - all: - type: builtin - configure: --with-libxml-dir=/usr - build_dep: [libxml2-dev] + already_avail: "{{ php_all_versions }}" xmlrpc: all: type: builtin 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, 7.4] - all: - type: builtin - configure: --with-libxml-dir=/usr - build_dep: [libxml2-dev] + already_avail: "{{ php_all_versions }}" xsl: all: type: builtin From a645486c84e0b8a18d9d978dd3243b2b476d4455 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 28 Dec 2018 17:48:05 +0100 Subject: [PATCH 3/8] Fix readline for PHP 5.3 --- Dockerfiles/mods/Dockerfile-5.3 | 2 -- build/ansible/group_vars/all.yml | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index 74ac4eec..e613fc6c 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -544,8 +544,6 @@ 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/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 81bf8ca1..475a5860 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -1243,6 +1243,7 @@ extensions_available: build_dep: [libpspell-dev] run_dep: [libaspell15] readline: + disabled: [5.3] already_avail: "{{ php_all_versions }}" recode: already_avail: [5.3, 5.4] From 6e0db69047eb09031dd9ef982588df424cd01ed2 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 28 Dec 2018 17:50:23 +0100 Subject: [PATCH 4/8] Add tool: Node.js Process Manager with a built-in Load Balancer --- Dockerfiles/work/Dockerfile-5.2 | 2 ++ Dockerfiles/work/Dockerfile-5.3 | 2 ++ Dockerfiles/work/Dockerfile-5.4 | 2 ++ Dockerfiles/work/Dockerfile-5.5 | 2 ++ Dockerfiles/work/Dockerfile-5.6 | 2 ++ Dockerfiles/work/Dockerfile-7.0 | 2 ++ Dockerfiles/work/Dockerfile-7.1 | 2 ++ Dockerfiles/work/Dockerfile-7.2 | 2 ++ Dockerfiles/work/Dockerfile-7.3 | 2 ++ Dockerfiles/work/Dockerfile-7.4 | 2 ++ build/ansible/group_vars/all.yml | 5 +++++ 11 files changed, 25 insertions(+) diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index ae5d49a6..fdd32558 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -205,6 +205,8 @@ RUN set -x \ && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # webpack diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 48a7ef87..babacc7f 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -239,6 +239,8 @@ RUN set -x \ && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # webpack diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index c9979551..20c4b581 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -265,6 +265,8 @@ RUN set -x \ && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # symfony diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index f5839955..e73e2a88 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -276,6 +276,8 @@ RUN set -x \ && COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # symfony diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index af38f61e..1ae4985d 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -289,6 +289,8 @@ RUN set -x \ && COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # symfony diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 71f718a8..ed450f91 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -289,6 +289,8 @@ RUN set -x \ && COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # symfony diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index fc1f085e..1c7fffb2 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -289,6 +289,8 @@ RUN set -x \ && COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # symfony diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index afbea6da..90c55771 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -289,6 +289,8 @@ RUN set -x \ && COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # symfony diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 37edbc25..b5646501 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -278,6 +278,8 @@ RUN set -x \ && COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # symfony diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index bea2d4ea..c2e052df 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -278,6 +278,8 @@ RUN set -x \ && COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \ && ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \ \ +# pm2 + && until npm install pm2 -g; do sleep 1; done \ # sass && gem install sass \ # symfony diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 475a5860..21cce0cc 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -220,6 +220,7 @@ software_enabled: - phpcbf - phpunit - photon + - pm2 - sass - symfony - webpack @@ -595,6 +596,10 @@ software_available: command: | COMPOSER_HOME="{{ compose_home }}" composer global require "photoncms/installer" \ && ln -s {{ compose_home }}/vendor/photoncms/installer/photon /usr/local/bin/photon \ + # https://github.com/Unitech/pm2 + pm2: + all: + command: until npm install pm2 -g; do sleep 1; done sass: check: sass --version | grep -E '[.0-9]+' all: From f376fd6766174603a5fe2ba8c798fe075c6ecb4e Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 28 Dec 2018 18:00:16 +0100 Subject: [PATCH 5/8] PHP module readline only needs to be checked for cli usage --- Dockerfiles/mods/Dockerfile-5.2 | 1 - Dockerfiles/mods/Dockerfile-5.3 | 1 + Dockerfiles/mods/Dockerfile-5.4 | 1 - Dockerfiles/mods/Dockerfile-5.5 | 1 - Dockerfiles/mods/Dockerfile-5.6 | 1 - Dockerfiles/mods/Dockerfile-7.0 | 1 - Dockerfiles/mods/Dockerfile-7.1 | 1 - Dockerfiles/mods/Dockerfile-7.2 | 1 - Dockerfiles/mods/Dockerfile-7.3 | 1 - Dockerfiles/mods/Dockerfile-7.4 | 1 - build/ansible/DOCKERFILES/Dockerfile-mods.j2 | 3 +++ build/ansible/group_vars/all.yml | 1 - 12 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 index 56acb603..b9f8df07 100644 --- a/Dockerfiles/mods/Dockerfile-5.2 +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -480,7 +480,6 @@ RUN set -x \ && 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 e613fc6c..b1863299 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -544,6 +544,7 @@ 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 -m | grep -oiE '^recode$' \ && php-fpm -m | grep -oiE '^recode$' \ && php -m | grep -oiE '^redis$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index edbf998d..d9323be7 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -545,7 +545,6 @@ RUN set -x \ && 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 4b325c9b..82609d98 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -539,7 +539,6 @@ RUN set -x \ && 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.6 b/Dockerfiles/mods/Dockerfile-5.6 index 7b9eb42c..fa530ed5 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -543,7 +543,6 @@ RUN set -x \ && 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-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 44493918..58b4be56 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -553,7 +553,6 @@ RUN set -x \ && 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-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index 8ee6f9b9..4e567dd6 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -553,7 +553,6 @@ RUN set -x \ && 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-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index bc7de877..8d3d1326 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -554,7 +554,6 @@ RUN set -x \ && 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-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index b09bf877..0adc6cd6 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -523,7 +523,6 @@ RUN set -x \ && 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-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index d472a70a..17404171 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -476,7 +476,6 @@ RUN set -x \ && 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/build/ansible/DOCKERFILES/Dockerfile-mods.j2 b/build/ansible/DOCKERFILES/Dockerfile-mods.j2 index d2a1e3fa..37bb92c1 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-mods.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-mods.j2 @@ -224,6 +224,9 @@ RUN set -x \ {%- if ext == 'opcache' %} && php -m | grep -oiE '^Zend Opcache$' \ && php-fpm -m | grep -oiE '^Zend Opcache$' \ +{# #} + {%- elif ext == 'readline' %} + && php -m | grep -oiE '^readline$' \ {# #} {%- elif ext not in ['ioncube'] %} && php -m | grep -oiE '^{{ ext }}$' \ diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 21cce0cc..80b70975 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -1248,7 +1248,6 @@ extensions_available: build_dep: [libpspell-dev] run_dep: [libaspell15] readline: - disabled: [5.3] already_avail: "{{ php_all_versions }}" recode: already_avail: [5.3, 5.4] From 3926ee7c7d49085fb4d0ef9d6b67fb45b2b194fa Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 28 Dec 2018 18:42:35 +0100 Subject: [PATCH 6/8] Check for pm2 installation --- Dockerfiles/work/Dockerfile-5.2 | 1 + Dockerfiles/work/Dockerfile-5.3 | 1 + Dockerfiles/work/Dockerfile-5.4 | 1 + Dockerfiles/work/Dockerfile-5.5 | 1 + Dockerfiles/work/Dockerfile-5.6 | 1 + Dockerfiles/work/Dockerfile-7.0 | 1 + Dockerfiles/work/Dockerfile-7.1 | 1 + Dockerfiles/work/Dockerfile-7.2 | 1 + Dockerfiles/work/Dockerfile-7.3 | 1 + Dockerfiles/work/Dockerfile-7.4 | 1 + build/ansible/group_vars/all.yml | 1 + 11 files changed, 11 insertions(+) diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index fdd32558..b0466eac 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -308,6 +308,7 @@ RUN set -x \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index babacc7f..dbbf3d7f 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -350,6 +350,7 @@ RUN set -x \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ && wp --allow-root --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 20c4b581..538d609f 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -382,6 +382,7 @@ RUN set -x \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index e73e2a88..bd061c23 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -396,6 +396,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 1ae4985d..5f19be9a 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -410,6 +410,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index ed450f91..dd0b6f66 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -410,6 +410,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 1c7fffb2..2a6049b6 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -410,6 +410,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 90c55771..43a1ff95 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -410,6 +410,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index b5646501..8f024706 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -398,6 +398,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index c2e052df..652aa35d 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -398,6 +398,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ + && pm2 --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 80b70975..2ff66d34 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -598,6 +598,7 @@ software_available: && ln -s {{ compose_home }}/vendor/photoncms/installer/photon /usr/local/bin/photon \ # https://github.com/Unitech/pm2 pm2: + check: pm2 --version | grep -E '[.0-9]+' all: command: until npm install pm2 -g; do sleep 1; done sass: From 452269c1b06600e4cca498bc4e2b6dcf99f97564 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 28 Dec 2018 18:47:57 +0100 Subject: [PATCH 7/8] Use two init levels for startup scripts --- Dockerfiles/prod/data/docker-entrypoint.sh | 3 +- Dockerfiles/work/data/docker-entrypoint.sh | 3 +- README.md | 10 ++- ...ts.sh => 08-test-custom-user-scripts-1.sh} | 2 +- tests/prod/09-test-custom-user-scripts-2.sh | 62 +++++++++++++++++++ 5 files changed, 74 insertions(+), 6 deletions(-) rename tests/prod/{08-test-custom-user-scripts.sh => 08-test-custom-user-scripts-1.sh} (98%) create mode 100755 tests/prod/09-test-custom-user-scripts-2.sh diff --git a/Dockerfiles/prod/data/docker-entrypoint.sh b/Dockerfiles/prod/data/docker-entrypoint.sh index ce2b24e8..11d964ec 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.sh @@ -181,7 +181,8 @@ disable_modules "DISABLE_MODULES" "${DEBUG_LEVEL}" ### ### Run custom user supplied scripts ### -execute_custom_scripts "/startup.d" "${DEBUG_LEVEL}" +execute_custom_scripts "/startup.1.d" "${DEBUG_LEVEL}" +execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}" ### diff --git a/Dockerfiles/work/data/docker-entrypoint.sh b/Dockerfiles/work/data/docker-entrypoint.sh index dd8b6bfd..c7712f2a 100755 --- a/Dockerfiles/work/data/docker-entrypoint.sh +++ b/Dockerfiles/work/data/docker-entrypoint.sh @@ -209,7 +209,8 @@ update_ca_certificates "/ca" "${DEBUG_LEVEL}" ### ### Run custom user supplied scripts ### -execute_custom_scripts "/startup.d" "${DEBUG_LEVEL}" +execute_custom_scripts "/startup.1.d" "${DEBUG_LEVEL}" +execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}" ### diff --git a/README.md b/README.md index 26e4dcbb..f1843757 100644 --- a/README.md +++ b/README.md @@ -760,7 +760,7 @@ Have a look at the following table to see all offered volumes for each Docker im - prod

work + prod

work /etc/php-custom.d Mount this directory into your host computer and add custom \*.ini files in order to alter php behaviour. @@ -773,8 +773,12 @@ Have a look at the following table to see all offered volumes for each Docker im Mount this directory into your host computer and add custo \*.so files in order to add your php modules.

Note:Your should then also provide a custom \*.ini file in order to actually load your custom provided module. - /startup.d - Any executable scripts ending by \*.sh found in this directory will be executed during startup. This is useful to supply additional commands (such as installing custom software) when the container starts up. + /startup.1.d + Any executable scripts ending by \*.sh found in this directory will be executed during startup. This is useful to supply additional commands (such as installing custom software) when the container starts up. (will run before /startup.2.d) + + + /startup.2.d + Any executable scripts ending by \*.sh found in this directory will be executed during startup. This is useful to supply additional commands (such as installing custom software) when the container starts up. (will run after /startup.1.d) /var/log/php diff --git a/tests/prod/08-test-custom-user-scripts.sh b/tests/prod/08-test-custom-user-scripts-1.sh similarity index 98% rename from tests/prod/08-test-custom-user-scripts.sh rename to tests/prod/08-test-custom-user-scripts-1.sh index 63f70175..ccc064ac 100755 --- a/tests/prod/08-test-custom-user-scripts.sh +++ b/tests/prod/08-test-custom-user-scripts-1.sh @@ -23,7 +23,7 @@ FLAVOUR="${3}" ### Check if PHP still starts up with working scripts ### RUN_SH_HOST="$( mktemp -d )" -RUN_SH_CONT="/startup.d" +RUN_SH_CONT="/startup.1.d" # Fix mount permissions chmod 0777 "${RUN_SH_HOST}" diff --git a/tests/prod/09-test-custom-user-scripts-2.sh b/tests/prod/09-test-custom-user-scripts-2.sh new file mode 100755 index 00000000..eadabd68 --- /dev/null +++ b/tests/prod/09-test-custom-user-scripts-2.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +set -e +set -u +set -o pipefail + +CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" + +IMAGE="${1}" +VERSION="${2}" +FLAVOUR="${3}" + +# shellcheck disable=SC1090 +. "${CWD}/../.lib.sh" + + + +############################################################ +# Tests +############################################################ + +### +### Check if PHP still starts up with working scripts +### +RUN_SH_HOST="$( mktemp -d )" +RUN_SH_CONT="/startup.2.d" + +# Fix mount permissions +chmod 0777 "${RUN_SH_HOST}" + +# Add a startup script to execute +printf "#!/bin/bash\\necho 'abcdefghijklmnopq';\\n" > "${RUN_SH_HOST}/myscript1.sh" +chmod +x "${RUN_SH_HOST}/myscript1.sh" + +# Start PHP-FPM +did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${RUN_SH_HOST}:${RUN_SH_CONT}" )" + +# Wait for both containers to be up and running +run "sleep 10" + +# Check entrypoint for script run +if ! run "docker logs ${did} | grep 'myscript1.sh'"; then + docker_logs "${did}" || true + docker_stop "${did}" || true + rm -rf "${RUN_SH_HOST}" + echo "Failed" + exit 1 +fi + +# Check entrypoint for script output +if ! run "docker logs ${did} | grep 'abcdefghijklmnopq'"; then + docker_logs "${did}" || true + docker_stop "${did}" || true + rm -rf "${RUN_SH_HOST}" + echo "Failed" + exit 1 +fi + + +# Cleanup +docker_stop "${did}" +rm -rf "${RUN_SH_HOST}" From cb9826eff5c1e1c1413dfb91d55be0a57a2a232e Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 28 Dec 2018 18:54:57 +0100 Subject: [PATCH 8/8] Dont install phar on already available versions --- Dockerfiles/mods/Dockerfile-5.3 | 5 ----- build/ansible/group_vars/all.yml | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index b1863299..041e32ab 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -300,11 +300,6 @@ RUN set -x \ && (rm -rf /usr/local/lib/php/test/phalcon || true) \ && (rm -rf /usr/local/lib/php/doc/phalcon || true) \ \ -# ---- Installing PHP Extension: phar ---- - && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) phar \ - && (rm -rf /usr/local/lib/php/test/phar || true) \ - && (rm -rf /usr/local/lib/php/doc/phar || true) \ - \ # ---- Installing PHP Extension: pspell ---- && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ && (rm -rf /usr/local/lib/php/test/pspell || true) \ diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 2ff66d34..a3f2052a 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -1235,11 +1235,9 @@ extensions_available: git_ref: $(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) command: cd build && ./install phar: - already_avail: [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] + already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4] 5.2: type: pecl - all: - type: builtin build_dep: [libssl-dev] posix: already_avail: "{{ php_all_versions }}"