From f6015c766a87402dfab34a4a0185e2f8c821d8e6 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 11 Dec 2020 15:35:42 +0100 Subject: [PATCH 01/14] Added various modules to PHP 8.0 --- CHANGELOG.md | 6 + Dockerfiles/mods/Dockerfile-5.2 | 3 +- Dockerfiles/mods/Dockerfile-5.3 | 3 +- Dockerfiles/mods/Dockerfile-5.4 | 3 +- Dockerfiles/mods/Dockerfile-5.5 | 3 +- Dockerfiles/mods/Dockerfile-5.6 | 3 +- Dockerfiles/mods/Dockerfile-7.0 | 3 +- Dockerfiles/mods/Dockerfile-7.1 | 3 +- Dockerfiles/mods/Dockerfile-7.4 | 2 +- Dockerfiles/mods/Dockerfile-8.0 | 168 ++++++++++++++++++++++---- README.md | 2 +- build/ansible/group_vars/all/mods.yml | 54 ++++----- 12 files changed, 191 insertions(+), 62 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b9d490..fecf28c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ ## Unreleased +## Release 0.122 + +#### Added +- Added `apcu`, `igbinary`, `mcrypt`, `memcache`, `msgpack`, `oauth`, `psr`, `solr`, `xlswriter`, `yaml` to PHP 8.0 + + ## Release 0.121 #### Fixed diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 index c1161d6..0f20931 100644 --- a/Dockerfiles/mods/Dockerfile-5.2 +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -242,8 +242,9 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mcrypt -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && true diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index 3649710..fca412c 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -254,8 +254,9 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mcrypt -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && true diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index cbc9c89..6dd6575 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -254,8 +254,9 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mcrypt -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension + # Installation && docker-php-ext-install mcrypt \ && true diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index d95ad8c..8144b9b 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -262,8 +262,9 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mcrypt -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && true diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index be00ae8..abb9286 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -278,8 +278,9 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mcrypt -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && true diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 6ed860a..3cefd3c 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -295,8 +295,9 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mcrypt -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && true diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index cc8889a..a9af24a 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -295,8 +295,9 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mcrypt -------------------- RUN set -eux \ - # Installation: Generic + # Installation: Version specific # Type: Built-in extension + # Installation && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ && true diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index f08bfb0..dcdd821 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -304,7 +304,7 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mcrypt -------------------- RUN set -eux \ - # Installation: Version specific + # Installation: Generic # Type: PECL extension # Default: Pecl command && pecl install mcrypt \ diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index 2fe4421..13bce6e 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -14,6 +14,7 @@ RUN set -eux \ freetds-dev \ libaio-dev \ libbz2-dev \ + libcurl4-openssl-dev \ libenchant-dev \ libevent-dev \ libfbclient2 \ @@ -23,7 +24,9 @@ RUN set -eux \ libicu-dev \ libjpeg-dev \ libldap2-dev \ + libmcrypt-dev \ libmemcached-dev \ + libpcre3-dev \ libpng-dev \ libpq-dev \ libpspell-dev \ @@ -37,6 +40,7 @@ RUN set -eux \ libxml2-dev \ libxpm-dev \ libxslt-dev \ + libyaml-dev \ libzip-dev \ snmp \ zlib1g-dev \ @@ -58,6 +62,17 @@ RUN set -eux \ echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ fi +# -------------------- 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 @@ -137,6 +152,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: igbinary -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install igbinary \ + # Enabling + && docker-php-ext-enable igbinary \ + && true + + # -------------------- Installing PHP Extension: intl -------------------- RUN set -eux \ # Installation: Generic @@ -157,6 +183,39 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install mcrypt \ + # Enabling + && docker-php-ext-enable mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack \ + # Enabling + && docker-php-ext-enable msgpack \ + && 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 @@ -181,17 +240,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mongodb -------------------- RUN set -eux \ - # Installation: Version specific - # Type: GIT extension - && git clone https://github.com/mongodb/mongo-php-driver /tmp/mongodb \ - && cd /tmp/mongodb \ - # Custom: Install command - && git submodule update --init \ -&& phpize \ -&& ./configure --enable-mongodb \ -&& make -j$(getconf _NPROCESSORS_ONLN) \ -&& make install \ - \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install mongodb \ # Enabling && docker-php-ext-enable mongodb \ && true @@ -205,6 +257,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 @@ -323,6 +386,17 @@ 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: pspell -------------------- RUN set -eux \ # Installation: Generic @@ -351,8 +425,6 @@ phpize \ && ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -&& rm -rf /usr/local/include/php/ext/igbinary \ -&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ @@ -403,6 +475,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: solr -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install solr \ + # Enabling + && docker-php-ext-enable solr \ + && true + + # -------------------- Installing PHP Extension: sysvmsg -------------------- RUN set -eux \ # Installation: Generic @@ -437,17 +520,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: xdebug -------------------- RUN set -eux \ - # Installation: Version specific - # Type: GIT extension - && git clone https://github.com/xdebug/xdebug /tmp/xdebug \ - && cd /tmp/xdebug \ - # Custom: Branch - && git checkout $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) \ - # Default: Install command - && phpize \ - && ./configure --enable-xdebug \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xdebug \ # Enabling && docker-php-ext-enable xdebug \ && true @@ -461,6 +537,28 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xlswriter -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xlswriter \ + # Enabling + && docker-php-ext-enable xlswriter \ + && true + + +# -------------------- Installing PHP Extension: yaml -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install yaml \ + # Enabling + && docker-php-ext-enable yaml \ + && true + + # -------------------- Installing PHP Extension: zip -------------------- RUN set -eux \ # Installation: Generic @@ -537,6 +635,7 @@ RUN set -eux \ libfreetype6 \ libicu63 \ libjpeg62-turbo \ + libmcrypt4 \ libmemcachedutil2 \ libpng16-16 \ libpq5 \ @@ -546,6 +645,7 @@ RUN set -eux \ libwebp6 \ libxpm4 \ libxslt1.1 \ + libyaml-0-2 \ libzip4 \ snmp \ ca-certificates \ @@ -586,6 +686,8 @@ RUN set -eux \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && rm -f /usr/local/etc/php/php.ini \ \ + && php -m | grep -oiE '^apcu$' \ + && php-fpm -m | grep -oiE '^apcu$' \ && php -m | grep -oiE '^bcmath$' \ && php-fpm -m | grep -oiE '^bcmath$' \ && php -m | grep -oiE '^bz2$' \ @@ -622,6 +724,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^hash$' \ && php -m | grep -oiE '^iconv$' \ && php-fpm -m | grep -oiE '^iconv$' \ + && php -m | grep -oiE '^igbinary$' \ + && php-fpm -m | grep -oiE '^igbinary$' \ && php -m | grep -oiE '^intl$' \ && php-fpm -m | grep -oiE '^intl$' \ && php -m | grep -oiE '^json$' \ @@ -632,6 +736,12 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ + && php -m | grep -oiE '^mcrypt$' \ + && php-fpm -m | grep -oiE '^mcrypt$' \ + && php -m | grep -oiE '^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$' \ @@ -640,6 +750,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$' \ @@ -666,6 +778,8 @@ 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 '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ && php -m | grep -oiE '^posix$' \ @@ -691,6 +805,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^sockets$' \ && php -m | grep -oiE '^sodium$' \ && php-fpm -m | grep -oiE '^sodium$' \ + && php -m | grep -oiE '^solr$' \ + && php-fpm -m | grep -oiE '^solr$' \ && php -m | grep -oiE '^spl$' \ && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^sysvmsg$' \ @@ -713,6 +829,10 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^xmlwriter$' \ && php -m | grep -oiE '^xsl$' \ && php-fpm -m | grep -oiE '^xsl$' \ + && php -m | grep -oiE '^xlswriter$' \ + && php-fpm -m | grep -oiE '^xlswriter$' \ + && php -m | grep -oiE '^yaml$' \ + && php-fpm -m | grep -oiE '^yaml$' \ && php -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \ && true diff --git a/README.md b/README.md index 51bb9cf..54ed4ce 100644 --- a/README.md +++ b/README.md @@ -681,7 +681,7 @@ Check out this table to see which Docker image provides what PHP modules. 8.0 Core, ctype, curl, date, dom, FFI, 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 - bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib + apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, 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, Phar, posix, pspell, psr, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xlswriter, xml, xmlreader, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib 8.1 diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index b061519..2e884c9 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -168,7 +168,7 @@ extensions_available: build_dep: [librabbitmq-dev] run_dep: [librabbitmq4] apcu: - disabled: [5.2, 8.0, 8.1] + disabled: [5.2, 8.1] 5.3: type: pecl version: 4.0.11 @@ -329,7 +329,7 @@ extensions_available: iconv: already_avail: "{{ php_all_versions }}" igbinary: - disabled: [8.0, 8.1] + disabled: [8.1] 5.2: type: pecl version: 2.0.7 @@ -441,21 +441,33 @@ extensions_available: all: type: builtin mcrypt: - disabled: [8.0, 8.1] + disabled: [8.1] + 5.2: + type: builtin + 5.3: + type: builtin + 5.4: + type: builtin + 5.5: + type: builtin + 5.6: + type: builtin + 7.0: + type: builtin + 7.1: + type: builtin 7.2: type: pecl version: 1.0.1 7.3: type: pecl version: 1.0.2 - 7.4: - type: pecl all: - type: builtin + type: pecl run_dep: [libmcrypt4] build_dep: [libmcrypt-dev] memcache: - disabled: [8.0, 8.1] + disabled: [8.1] 5.2: type: pecl version: 2.2.7 @@ -561,15 +573,6 @@ extensions_available: 5.6: type: pecl version: 1.7.5 - 8.0: - type: git - git_url: https://github.com/mongodb/mongo-php-driver - command: | - git submodule update --init \ - && phpize \ - && ./configure --enable-mongodb \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ 8.1: type: git git_url: https://github.com/mongodb/mongo-php-driver @@ -583,7 +586,7 @@ extensions_available: type: pecl build_dep: [libssl-dev, libsasl2-dev] msgpack: - disabled: [8.0, 8.1] + disabled: [8.1] 5.2: type: pecl version: 0.5.7 @@ -618,7 +621,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, 8.1] oauth: - disabled: [8.0, 8.1] + disabled: [8.1] 5.2: type: pecl version: 1.2.3 @@ -770,7 +773,7 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] psr: - disabled: [5.2, 5.3, 8.0, 8.1] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module + disabled: [5.2, 5.3, 8.1] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module 5.4: type: pecl version: 0.5.1 @@ -872,8 +875,6 @@ extensions_available: && ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ - && rm -rf /usr/local/include/php/ext/igbinary \ - && rm -rf /usr/local/include/php/ext/msgpack \ reflection: already_avail: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] rdkafka: @@ -932,7 +933,7 @@ extensions_available: type: builtin build_dep: [libsodium-dev] solr: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 8.0, 8.1] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 8.1] all: type: pecl build_dep: [libxml2-dev, libcurl4-openssl-dev] @@ -1157,11 +1158,6 @@ extensions_available: 7.1: type: pecl version: 2.9.8 - 8.0: - type: git - git_url: https://github.com/xdebug/xdebug - git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) - configure: --enable-xdebug 8.1: type: git git_url: https://github.com/xdebug/xdebug @@ -1170,7 +1166,7 @@ extensions_available: all: type: pecl xlswriter: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0, 8.1] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.1] all: type: pecl build_dep: [zlib1g-dev] @@ -1196,7 +1192,7 @@ extensions_available: build_dep: [libxslt-dev] run_dep: [libxslt1.1] yaml: - disabled: [5.2, 8.0, 8.1] + disabled: [5.2, 8.1] 5.3: type: pecl version: 1.3.2 From ec8fc4eab63ab9a9a10ad09c25e07ea7c5774198 Mon Sep 17 00:00:00 2001 From: cytopia Date: Fri, 11 Dec 2020 17:08:14 +0100 Subject: [PATCH 02/14] Added various extensions to PHP 8.0 and PHP 8.1 --- CHANGELOG.md | 3 +- Dockerfiles/mods/Dockerfile-7.0 | 2 - Dockerfiles/mods/Dockerfile-7.1 | 2 - Dockerfiles/mods/Dockerfile-7.2 | 2 - Dockerfiles/mods/Dockerfile-7.3 | 2 - Dockerfiles/mods/Dockerfile-7.4 | 2 - Dockerfiles/mods/Dockerfile-8.0 | 31 +++++ Dockerfiles/mods/Dockerfile-8.1 | 170 ++++++++++++++++++++++++-- README.md | 4 +- build/ansible/group_vars/all/mods.yml | 33 ++--- 10 files changed, 204 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fecf28c..2163b7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,8 @@ ## Release 0.122 #### Added -- Added `apcu`, `igbinary`, `mcrypt`, `memcache`, `msgpack`, `oauth`, `psr`, `solr`, `xlswriter`, `yaml` to PHP 8.0 +- Added `apcu`, `blackfire`, `igbinary`, `imap`, `mcrypt`, `memcache`, `msgpack`, `oauth`, `psr`, `solr`, `xlswriter`, `yaml` to PHP 8.0 +- Added `apcu`, `igbinary`, `imap`, `mcrypt`, `memcache`, `msgpack`, `oauth`, `psr`, `solr`, `xlswriter`, `yaml` to PHP 8.1 ## Release 0.121 diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 3cefd3c..ebbd5ba 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -555,8 +555,6 @@ phpize \ && ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -&& rm -rf /usr/local/include/php/ext/igbinary \ -&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index a9af24a..812130c 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -555,8 +555,6 @@ phpize \ && ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -&& rm -rf /usr/local/include/php/ext/igbinary \ -&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index 0bc9894..25b7a1e 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -558,8 +558,6 @@ phpize \ && ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -&& rm -rf /usr/local/include/php/ext/igbinary \ -&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index 3005ba7..3e60bc1 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -558,8 +558,6 @@ phpize \ && ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -&& rm -rf /usr/local/include/php/ext/igbinary \ -&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index dcdd821..1852362 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -552,8 +552,6 @@ phpize \ && ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -&& rm -rf /usr/local/include/php/ext/igbinary \ -&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index 13bce6e..944d683 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -14,6 +14,7 @@ RUN set -eux \ freetds-dev \ libaio-dev \ libbz2-dev \ + libc-client-dev \ libcurl4-openssl-dev \ libenchant-dev \ libevent-dev \ @@ -23,6 +24,7 @@ RUN set -eux \ libib-util \ libicu-dev \ libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ libmcrypt-dev \ libmemcached-dev \ @@ -81,6 +83,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 @@ -163,6 +179,18 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + # -------------------- Installing PHP Extension: intl -------------------- RUN set -eux \ # Installation: Generic @@ -629,6 +657,7 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ + libc-client2007e \ libenchant1c2a \ libfbclient2 \ libffi6 \ @@ -726,6 +755,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^iconv$' \ && php -m | grep -oiE '^igbinary$' \ && php-fpm -m | grep -oiE '^igbinary$' \ + && php -m | grep -oiE '^imap$' \ + && php-fpm -m | grep -oiE '^imap$' \ && php -m | grep -oiE '^intl$' \ && php-fpm -m | grep -oiE '^intl$' \ && php -m | grep -oiE '^json$' \ diff --git a/Dockerfiles/mods/Dockerfile-8.1 b/Dockerfiles/mods/Dockerfile-8.1 index 80283b0..24b4790 100644 --- a/Dockerfiles/mods/Dockerfile-8.1 +++ b/Dockerfiles/mods/Dockerfile-8.1 @@ -14,6 +14,8 @@ RUN set -eux \ freetds-dev \ libaio-dev \ libbz2-dev \ + libc-client-dev \ + libcurl4-openssl-dev \ libenchant-dev \ libevent-dev \ libfbclient2 \ @@ -22,8 +24,11 @@ RUN set -eux \ libib-util \ libicu-dev \ libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ + libmcrypt-dev \ libmemcached-dev \ + libpcre3-dev \ libpng-dev \ libpq-dev \ libpspell-dev \ @@ -37,6 +42,7 @@ RUN set -eux \ libxml2-dev \ libxpm-dev \ libxslt-dev \ + libyaml-dev \ libzip-dev \ snmp \ zlib1g-dev \ @@ -58,6 +64,17 @@ RUN set -eux \ echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ fi +# -------------------- 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 @@ -137,6 +154,29 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: igbinary -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install igbinary \ + # Enabling + && docker-php-ext-enable igbinary \ + && true + + +# -------------------- Installing PHP Extension: imap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && true + + # -------------------- Installing PHP Extension: intl -------------------- RUN set -eux \ # Installation: Generic @@ -157,6 +197,39 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install mcrypt \ + # Enabling + && docker-php-ext-enable mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack \ + # Enabling + && docker-php-ext-enable msgpack \ + && 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 @@ -181,17 +254,10 @@ RUN set -eux \ # -------------------- Installing PHP Extension: mongodb -------------------- RUN set -eux \ - # Installation: Version specific - # Type: GIT extension - && git clone https://github.com/mongodb/mongo-php-driver /tmp/mongodb \ - && cd /tmp/mongodb \ - # Custom: Install command - && git submodule update --init \ -&& phpize \ -&& ./configure --enable-mongodb \ -&& make -j$(getconf _NPROCESSORS_ONLN) \ -&& make install \ - \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install mongodb \ # Enabling && docker-php-ext-enable mongodb \ && true @@ -205,6 +271,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 @@ -323,6 +400,17 @@ 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: pspell -------------------- RUN set -eux \ # Installation: Generic @@ -351,8 +439,6 @@ phpize \ && ./configure --enable-redis ${REDIS_ARGS} \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ -&& rm -rf /usr/local/include/php/ext/igbinary \ -&& rm -rf /usr/local/include/php/ext/msgpack \ \ # Enabling && docker-php-ext-enable redis \ @@ -403,6 +489,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: solr -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install solr \ + # Enabling + && docker-php-ext-enable solr \ + && true + + # -------------------- Installing PHP Extension: sysvmsg -------------------- RUN set -eux \ # Installation: Generic @@ -461,6 +558,28 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xlswriter -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xlswriter \ + # Enabling + && docker-php-ext-enable xlswriter \ + && true + + +# -------------------- Installing PHP Extension: yaml -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install yaml \ + # Enabling + && docker-php-ext-enable yaml \ + && true + + # -------------------- Installing PHP Extension: zip -------------------- RUN set -eux \ # Installation: Generic @@ -531,12 +650,14 @@ RUN set -eux \ && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ libaio1 \ libaspell15 \ + libc-client2007e \ libenchant1c2a \ libfbclient2 \ libffi6 \ libfreetype6 \ libicu63 \ libjpeg62-turbo \ + libmcrypt4 \ libmemcachedutil2 \ libpng16-16 \ libpq5 \ @@ -546,6 +667,7 @@ RUN set -eux \ libwebp6 \ libxpm4 \ libxslt1.1 \ + libyaml-0-2 \ libzip4 \ snmp \ ca-certificates \ @@ -586,6 +708,8 @@ RUN set -eux \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && rm -f /usr/local/etc/php/php.ini \ \ + && php -m | grep -oiE '^apcu$' \ + && php-fpm -m | grep -oiE '^apcu$' \ && php -m | grep -oiE '^bcmath$' \ && php-fpm -m | grep -oiE '^bcmath$' \ && php -m | grep -oiE '^bz2$' \ @@ -622,6 +746,10 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^hash$' \ && php -m | grep -oiE '^iconv$' \ && php-fpm -m | grep -oiE '^iconv$' \ + && php -m | grep -oiE '^igbinary$' \ + && php-fpm -m | grep -oiE '^igbinary$' \ + && php -m | grep -oiE '^imap$' \ + && php-fpm -m | grep -oiE '^imap$' \ && php -m | grep -oiE '^intl$' \ && php-fpm -m | grep -oiE '^intl$' \ && php -m | grep -oiE '^json$' \ @@ -632,6 +760,12 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ + && php -m | grep -oiE '^mcrypt$' \ + && php-fpm -m | grep -oiE '^mcrypt$' \ + && php -m | grep -oiE '^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$' \ @@ -640,6 +774,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$' \ @@ -666,6 +802,8 @@ 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 '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ && php -m | grep -oiE '^posix$' \ @@ -691,6 +829,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^sockets$' \ && php -m | grep -oiE '^sodium$' \ && php-fpm -m | grep -oiE '^sodium$' \ + && php -m | grep -oiE '^solr$' \ + && php-fpm -m | grep -oiE '^solr$' \ && php -m | grep -oiE '^spl$' \ && php-fpm -m | grep -oiE '^spl$' \ && php -m | grep -oiE '^sysvmsg$' \ @@ -713,6 +853,10 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^xmlwriter$' \ && php -m | grep -oiE '^xsl$' \ && php-fpm -m | grep -oiE '^xsl$' \ + && php -m | grep -oiE '^xlswriter$' \ + && php-fpm -m | grep -oiE '^xlswriter$' \ + && php -m | grep -oiE '^yaml$' \ + && php-fpm -m | grep -oiE '^yaml$' \ && php -m | grep -oiE '^zip$' \ && php-fpm -m | grep -oiE '^zip$' \ && true diff --git a/README.md b/README.md index 54ed4ce..83a115e 100644 --- a/README.md +++ b/README.md @@ -681,12 +681,12 @@ Check out this table to see which Docker image provides what PHP modules. 8.0 Core, ctype, curl, date, dom, FFI, 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, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, 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, Phar, posix, pspell, psr, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xlswriter, xml, xmlreader, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib + apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, 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, Phar, posix, pspell, psr, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xlswriter, xml, xmlreader, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib 8.1 Core, ctype, curl, date, dom, FFI, 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 - bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, intl, json, ldap, libxml, mbstring, memcached, mongodb, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib + apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imap, 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, Phar, posix, pspell, psr, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, solr, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdebug, xlswriter, xml, xmlreader, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index 2e884c9..da8c2c7 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -168,7 +168,7 @@ extensions_available: build_dep: [librabbitmq-dev] run_dep: [librabbitmq4] apcu: - disabled: [5.2, 8.1] + disabled: [5.2] 5.3: type: pecl version: 4.0.11 @@ -187,7 +187,7 @@ extensions_available: all: type: builtin blackfire: - disabled: [5.2, 5.3, 5.4, 5.5, 8.0, 8.1] + disabled: [5.2, 5.3, 5.4, 5.5, 8.1] all: type: custom command: | @@ -329,7 +329,7 @@ extensions_available: iconv: already_avail: "{{ php_all_versions }}" igbinary: - disabled: [8.1] + disabled: [] 5.2: type: pecl version: 2.0.7 @@ -376,7 +376,7 @@ extensions_available: && sed -i'' 's|.*= 7.2 by phalcon >=4.0 module + disabled: [5.2, 5.3] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module 5.4: type: pecl version: 0.5.1 @@ -933,7 +924,7 @@ extensions_available: type: builtin build_dep: [libsodium-dev] solr: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 8.1] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0] all: type: pecl build_dep: [libxml2-dev, libcurl4-openssl-dev] @@ -1166,7 +1157,7 @@ extensions_available: all: type: pecl xlswriter: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.1] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6] all: type: pecl build_dep: [zlib1g-dev] @@ -1192,7 +1183,7 @@ extensions_available: build_dep: [libxslt-dev] run_dep: [libxslt1.1] yaml: - disabled: [5.2, 8.1] + disabled: [5.2] 5.3: type: pecl version: 1.3.2 From 88aeca57aa4420309bcabe4abb5b88fcc9cffc37 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 13:57:19 +0100 Subject: [PATCH 03/14] Prepare GitHub Actions --- .github/workflows/{php-ci.yml => build.yml} | 102 +++++----------- .github/workflows/linting.yml | 37 ++++-- .../{php-nightly.yml => nightly.yml} | 111 ++++++------------ Makefile | 24 +++- README.md | 7 +- 5 files changed, 114 insertions(+), 167 deletions(-) rename .github/workflows/{php-ci.yml => build.yml} (75%) rename .github/workflows/{php-nightly.yml => nightly.yml} (72%) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/build.yml similarity index 75% rename from .github/workflows/php-ci.yml rename to .github/workflows/build.yml index a662eb6..0c7fcfa 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: PHP-CI +name: build # ------------------------------------------------------------------------------------------------- @@ -12,55 +12,14 @@ name: PHP-CI on: # Runs on Pull Requests pull_request: - - # Runs on master Branch and Tags + # Runs on Push push: - branches: - - master - tags: - - '[0-9]+.[0-9]+*' # ------------------------------------------------------------------------------------------------- # What to run # ------------------------------------------------------------------------------------------------- jobs: - diagnostics: - name: Diagnostics - runs-on: ubuntu-latest - strategy: - fail-fast: False - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Show environment - run: | - env - - # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context - - name: Show GitHub variables - run: | - echo "github.actor: ${{ github.actor }}" - echo "github.ref: ${{ github.ref }}" - echo "github.base_ref: ${{ github.base_ref }}" - echo "github.head_ref: ${{ github.head_ref }}" - echo "github.event: ${{ github.event }}" - echo "github.event_name: ${{ github.event_name }}" - echo "github.event.pull_request.base.repo.id: ${{ github.event.pull_request.base.repo.id }}" - echo "github.event.pull_request.head.repo.id: ${{ github.event.pull_request.head.repo.id }}" - - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "${GITHUB_CONTEXT}" - - - name: Dump Runner context - env: - RUNNER_CONTEXT: ${{ toJson(runner) }} - run: echo "${RUNNER_CONTEXT}" - - build: name: "[ PHP-${{ matrix.version }} ]" runs-on: ubuntu-latest @@ -83,7 +42,7 @@ jobs: steps: # ------------------------------------------------------------ - # Checkout repository + # Setup repository # ------------------------------------------------------------ - name: Checkout repository uses: actions/checkout@v2 @@ -97,7 +56,7 @@ jobs: # Retrieve git info (tags, etc) git fetch --all - # BRANCH, TAG or COMMIT + # Branch, Tag or Commit GIT_TYPE="$( \ curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \ | sh \ @@ -111,15 +70,25 @@ jobs: | grep '^GIT_NAME' \ | sed 's|.*=||g' \ )" + # Docker Tag + if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then + DOCKER_TAG="${VERSION}" + else + DOCKER_TAG="${VERSION}-${GIT_SLUG}" + fi # Output echo "GIT_TYPE=${GIT_TYPE}" echo "GIT_SLUG=${GIT_SLUG}" + echo "DOCKER_TAG=${DOCKER_TAG}" # Export variable # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files - echo "GIT_TYPE=${GIT_TYPE}" >> $GITHUB_ENV - echo "GIT_SLUG=${GIT_SLUG}" >> $GITHUB_ENV + echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV} + echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV} + echo "DOCKER_TAG=${DOCKER_TAG}" >> ${GITHUB_ENV} + env: + VERSION: ${{ matrix.version }} # ------------------------------------------------------------ @@ -310,9 +279,8 @@ jobs: # ------------------------------------------------------------ - # Push build artifacts + # Deploy # ------------------------------------------------------------ - # Only run this, if the PR was created by the repo owner - name: Publish images (only repo owner) run: | retry() { @@ -328,34 +296,22 @@ jobs: return 1; } - # Info output - echo "Git Type: ${GIT_TYPE}" - echo "Git Slug: ${GIT_SLUG}" + # Output + echo "GIT_TYPE=${GIT_TYPE}" + echo "GIT_SLUG=${GIT_SLUG}" + echo "DOCKER_TAG=${DOCKER_TAG}" + + docker images # Login - echo "retry make login USER= PASS=" + retry make login USER=${{ secrets.DOCKERHUB_USERNAME }} PASS=${{ secrets.DOCKERHUB_PASSWORD }} # Push - if [ "${GIT_TYPE}" = "TAG" ]; then - echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}" - else - if [ "${GIT_SLUG}" = "master" ]; then - echo "retry make push-base VERSION=${VERSION}" - echo "retry make push-mods VERSION=${VERSION}" - echo "retry make push-prod VERSION=${VERSION}" - echo "retry make push-work VERSION=${VERSION}" - else - echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}" - fi - fi + echo "retry make push-base VERSION=${DOCKER_TAG}" + echo "retry make push-mods VERSION=${DOCKER_TAG}" + echo "retry make push-prod VERSION=${DOCKER_TAG}" + echo "retry make push-work VERSION=${DOCKER_TAG}" env: - VERSION: ${{ matrix.version }} RETRIES: 20 PAUSE: 10 # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions @@ -365,5 +321,5 @@ jobs: || (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) || - (github.event_name == 'pull_request' && (startsWith(github.head_ref, 'release-'))) + (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-')) ) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 87ea01d..3c252d5 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -1,27 +1,42 @@ --- -### -### Lints all generic and json files in the whole git repository -### +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: lint -name: Linting + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- on: + # Runs on Pull Requests pull_request: + +# ------------------------------------------------------------------------------------------------- +# What to run +# ------------------------------------------------------------------------------------------------- jobs: lint: name: "[ ${{ matrix.job }} ]" runs-on: ubuntu-latest - strategy: - fail-fast: False - matrix: - job: [gen-dockerfiles] steps: + # ------------------------------------------------------------ + # Setup repository + # ------------------------------------------------------------ - name: Checkout repository uses: actions/checkout@v2 + + # ------------------------------------------------------------ + # Lint repository + # ------------------------------------------------------------ + - name: Lint workflow + id: vars + run: | + make lint-workflow + - name: Diff generated Docker files run: | - make "${JOB}" + make gen-readme git diff --quiet || { echo "Build Changes"; git diff; git status; false; } - env: - JOB: ${{ matrix.job }} diff --git a/.github/workflows/php-nightly.yml b/.github/workflows/nightly.yml similarity index 72% rename from .github/workflows/php-nightly.yml rename to .github/workflows/nightly.yml index 3e8f8f9..f77f509 100644 --- a/.github/workflows/php-nightly.yml +++ b/.github/workflows/nightly.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: PHP-Nightly +name: nightly # ------------------------------------------------------------------------------------------------- @@ -19,50 +19,8 @@ on: # What to run # ------------------------------------------------------------------------------------------------- jobs: - diagnostics: - name: Diagnostics - runs-on: ubuntu-latest - strategy: - fail-fast: False - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Show environment - run: | - env - - # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context - - name: Show GitHub variables - run: | - echo "github.actor: ${{ github.actor }}" - echo "github.ref: ${{ github.ref }}" - echo "github.base_ref: ${{ github.base_ref }}" - echo "github.head_ref: ${{ github.head_ref }}" - echo "github.event: ${{ github.event }}" - echo "github.event_name: ${{ github.event_name }}" - echo "github.event.pull_request.base.repo.id: ${{ github.event.pull_request.base.repo.id }}" - echo "github.event.pull_request.head.repo.id: ${{ github.event.pull_request.head.repo.id }}" - - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "${GITHUB_CONTEXT}" - - - name: Dump Runner context - env: - RUNNER_CONTEXT: ${{ toJson(runner) }} - run: echo "${RUNNER_CONTEXT}" - - - name: Show git info - env: - RUNNER_CONTEXT: ${{ toJson(runner) }} - run: | - git log | head -20 - - - build: - name: "[ PHP-${{ matrix.version }} (ref: ${{ matrix.refs }}) ]" + nightly: + name: "[ PHP-${{ matrix.version }} ] (ref: ${{ matrix.refs }})" runs-on: ubuntu-latest strategy: fail-fast: False @@ -82,11 +40,11 @@ jobs: - '8.1' refs: - 'master' - - '0.121' + - '0.122' steps: # ------------------------------------------------------------ - # Checkout repository + # Setup repository # ------------------------------------------------------------ - name: Checkout repository uses: actions/checkout@v2 @@ -101,7 +59,7 @@ jobs: # Retrieve git info (tags, etc) git fetch --all - # BRANCH, TAG or COMMIT + # Branch, Tag or Commit GIT_TYPE="$( \ curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \ | sh \ @@ -115,15 +73,25 @@ jobs: | grep '^GIT_NAME' \ | sed 's|.*=||g' \ )" + # Docker Tag + if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then + DOCKER_TAG="${VERSION}" + else + DOCKER_TAG="${VERSION}-${GIT_SLUG}" + fi # Output echo "GIT_TYPE=${GIT_TYPE}" echo "GIT_SLUG=${GIT_SLUG}" + echo "DOCKER_TAG=${DOCKER_TAG}" # Export variable # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files - echo "GIT_TYPE=${GIT_TYPE}" >> $GITHUB_ENV - echo "GIT_SLUG=${GIT_SLUG}" >> $GITHUB_ENV + echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV} + echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV} + echo "DOCKER_TAG=${DOCKER_TAG}" >> ${GITHUB_ENV} + env: + VERSION: ${{ matrix.version }} # ------------------------------------------------------------ @@ -314,9 +282,8 @@ jobs: # ------------------------------------------------------------ - # Push build artifacts + # Deploy # ------------------------------------------------------------ - # Only run this, if the PR was created by the repo owner - name: Publish images (only repo owner) run: | retry() { @@ -332,42 +299,30 @@ jobs: return 1; } - # Info output - echo "Git Type: ${GIT_TYPE}" - echo "Git Slug: ${GIT_SLUG}" + # Output + echo "GIT_TYPE=${GIT_TYPE}" + echo "GIT_SLUG=${GIT_SLUG}" + echo "DOCKER_TAG=${DOCKER_TAG}" + + docker images # Login - echo "retry make login USER= PASS=" + retry make login USER=${{ secrets.DOCKERHUB_USERNAME }} PASS=${{ secrets.DOCKERHUB_PASSWORD }} # Push - if [ "${GIT_TYPE}" = "TAG" ]; then - echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}" - else - if [ "${GIT_SLUG}" = "master" ]; then - echo "retry make push-base VERSION=${VERSION}" - echo "retry make push-mods VERSION=${VERSION}" - echo "retry make push-prod VERSION=${VERSION}" - echo "retry make push-work VERSION=${VERSION}" - else - echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}" - echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}" - fi - fi + echo "retry make push-base VERSION=${DOCKER_TAG}" + echo "retry make push-mods VERSION=${DOCKER_TAG}" + echo "retry make push-prod VERSION=${DOCKER_TAG}" + echo "retry make push-work VERSION=${DOCKER_TAG}" env: - VERSION: ${{ matrix.version }} RETRIES: 20 PAUSE: 10 # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id && ( - (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) || - (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) || - (github.event_name == 'pull_request' && (startsWith(github.head_ref, 'release-'))) + (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-')) ) diff --git a/Makefile b/Makefile index 629c917..74f99c6 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,8 @@ help: @echo "Targets" @echo "--------------------------------------------------------------------------------" @echo + @echo "lint Lint project files and repository" + @echo @echo "gen-readme [VERSION=] Update README with PHP modules from built images." @echo "gen-dockerfiles [FAIL_FAST=] Generate Dockerfiles from templates." @echo @@ -67,6 +69,27 @@ help: @echo "ARGS Can be added to all build-* and rebuild-* targets" @echo " to supply additional docker build options." + +# ------------------------------------------------------------------------------------------------- +# Lint Targets +# ------------------------------------------------------------------------------------------------- + +lint: lint-workflow + +lint-workflow: + @\ + GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \ + GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \ + GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \ + if ! grep 'refs:' -A 100 .github/workflows/nightly.yml \ + | grep " - '$${GIT_NEXT_TAG}'" >/dev/null; then \ + echo "[ERR] New Tag required in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \ + exit 1; \ + else \ + echo "[OK] Git Tag present in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \ + fi + + # ------------------------------------------------------------------------------------------------- # GENERATE TARGETS # ------------------------------------------------------------------------------------------------- @@ -83,7 +106,6 @@ else cd build; ./gen-readme.sh $(VERSION) endif - gen-dockerfiles: docker run --rm \ $$(tty -s && echo "-it" || echo) \ diff --git a/README.md b/README.md index 83a115e..3955109 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # PHP-FPM Docker images -[![Linting](https://github.com/devilbox/docker-php-fpm/workflows/Linting/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=Linting) -[![CI](https://github.com/devilbox/docker-php-fpm/workflows/PHP-CI/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-CI) -[![Nightly](https://github.com/devilbox/docker-php-fpm/workflows/PHP-Nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly) -[![Travis](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm) +[![lint](https://github.com/devilbox/docker-php-fpm/workflows/lint/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=lint) +[![build](https://github.com/devilbox/docker-php-fpm/workflows/build/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=build) +[![nightly](https://github.com/devilbox/docker-php-fpm/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly) [![Release](https://img.shields.io/github/release/devilbox/docker-php-fpm.svg?colorB=orange)](https://github.com/devilbox/docker-php-fpm/releases) [![Gitter](https://badges.gitter.im/devilbox/Lobby.svg)](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Discourse](https://img.shields.io/discourse/https/devilbox.discourse.group/status.svg?colorB=%234CB697)](https://devilbox.discourse.group) From 5506d68f1fd395ea9d6eac0d7cc717e510b96d3b Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 14:01:00 +0100 Subject: [PATCH 04/14] Fix checkout --- .github/workflows/linting.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 3c252d5..dadde1b 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -19,7 +19,7 @@ on: # ------------------------------------------------------------------------------------------------- jobs: lint: - name: "[ ${{ matrix.job }} ]" + name: "Lint" runs-on: ubuntu-latest steps: # ------------------------------------------------------------ @@ -27,12 +27,13 @@ jobs: # ------------------------------------------------------------ - name: Checkout repository uses: actions/checkout@v2 + with: + fetch-depth: 0 # ------------------------------------------------------------ # Lint repository # ------------------------------------------------------------ - name: Lint workflow - id: vars run: | make lint-workflow From 48380c5d9881e4d8a451fccfec08571ba8ed64d8 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 14:03:04 +0100 Subject: [PATCH 05/14] Fix linting job --- .github/workflows/linting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index dadde1b..21b97db 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -39,5 +39,5 @@ jobs: - name: Diff generated Docker files run: | - make gen-readme + make gen-dockerfiles git diff --quiet || { echo "Build Changes"; git diff; git status; false; } From 6aafdd70237619e84f6cc8cbbf05e99378687081 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 14:08:10 +0100 Subject: [PATCH 06/14] Fix Docker Login --- .github/workflows/build.yml | 2 +- .github/workflows/nightly.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c7fcfa..27c327b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -304,7 +304,7 @@ jobs: docker images # Login - retry make login USER=${{ secrets.DOCKERHUB_USERNAME }} PASS=${{ secrets.DOCKERHUB_PASSWORD }} + retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} # Push echo "retry make push-base VERSION=${DOCKER_TAG}" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f77f509..a2d31a9 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -307,7 +307,7 @@ jobs: docker images # Login - retry make login USER=${{ secrets.DOCKERHUB_USERNAME }} PASS=${{ secrets.DOCKERHUB_PASSWORD }} + retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} # Push echo "retry make push-base VERSION=${DOCKER_TAG}" From 1b312bce339504dbabb1dd8c37176fc89327b493 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 14:24:56 +0100 Subject: [PATCH 07/14] Fix Docker image tags --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++---------- .github/workflows/nightly.yml | 47 +++++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27c327b..b07673d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,21 +72,33 @@ jobs: )" # Docker Tag if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then - DOCKER_TAG="${VERSION}" + DOCKER_TAG_BASE="${VERSION}-base" + DOCKER_TAG_MODS="${VERSION}-mods" + DOCKER_TAG_PROD="${VERSION}-prod" + DOCKER_TAG_WORK="${VERSION}-work" else - DOCKER_TAG="${VERSION}-${GIT_SLUG}" + DOCKER_TAG_BASE="${VERSION}-base-${GIT_SLUG}" + DOCKER_TAG_MODS="${VERSION}-mods-${GIT_SLUG}" + DOCKER_TAG_PROD="${VERSION}-prod-${GIT_SLUG}" + DOCKER_TAG_WORK="${VERSION}-work-${GIT_SLUG}" fi # Output echo "GIT_TYPE=${GIT_TYPE}" echo "GIT_SLUG=${GIT_SLUG}" - echo "DOCKER_TAG=${DOCKER_TAG}" + echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" + echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" + echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" + echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" # Export variable # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files - echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV} - echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV} - echo "DOCKER_TAG=${DOCKER_TAG}" >> ${GITHUB_ENV} + echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV} + echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV} + echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" >> ${GITHUB_ENV} + echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" >> ${GITHUB_ENV} + echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" >> ${GITHUB_ENV} + echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" >> ${GITHUB_ENV} env: VERSION: ${{ matrix.version }} @@ -299,27 +311,36 @@ jobs: # Output echo "GIT_TYPE=${GIT_TYPE}" echo "GIT_SLUG=${GIT_SLUG}" - echo "DOCKER_TAG=${DOCKER_TAG}" + echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" + echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" + echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" + echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" + # Tag image + retry make tag OLD_TAG="${VERSION}-base" NEW_TAG="${DOCKER_TAG_BASE}" + retry make tag OLD_TAG="${VERSION}-mods" NEW_TAG="${DOCKER_TAG_MODS}" + retry make tag OLD_TAG="${VERSION}-prod" NEW_TAG="${DOCKER_TAG_PROD}" + retry make tag OLD_TAG="${VERSION}-work" NEW_TAG="${DOCKER_TAG_WORK}" docker images # Login retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} # Push - echo "retry make push-base VERSION=${DOCKER_TAG}" - echo "retry make push-mods VERSION=${DOCKER_TAG}" - echo "retry make push-prod VERSION=${DOCKER_TAG}" - echo "retry make push-work VERSION=${DOCKER_TAG}" + echo "retry make push TAG=${DOCKER_TAG_BASE}" + echo "retry make push TAG=${DOCKER_TAG_MODS}" + echo "retry make push TAG=${DOCKER_TAG_PROD}" + echo "retry make push TAG=${DOCKER_TAG_WORK}" env: + VERSION: ${{ matrix.version }} RETRIES: 20 PAUSE: 10 # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id && ( - (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) || - (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-')) ) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a2d31a9..fffa989 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -75,21 +75,33 @@ jobs: )" # Docker Tag if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then - DOCKER_TAG="${VERSION}" + DOCKER_TAG_BASE="${VERSION}-base" + DOCKER_TAG_MODS="${VERSION}-mods" + DOCKER_TAG_PROD="${VERSION}-prod" + DOCKER_TAG_WORK="${VERSION}-work" else - DOCKER_TAG="${VERSION}-${GIT_SLUG}" + DOCKER_TAG_BASE="${VERSION}-base-${GIT_SLUG}" + DOCKER_TAG_MODS="${VERSION}-mods-${GIT_SLUG}" + DOCKER_TAG_PROD="${VERSION}-prod-${GIT_SLUG}" + DOCKER_TAG_WORK="${VERSION}-work-${GIT_SLUG}" fi # Output echo "GIT_TYPE=${GIT_TYPE}" echo "GIT_SLUG=${GIT_SLUG}" - echo "DOCKER_TAG=${DOCKER_TAG}" + echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" + echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" + echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" + echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" # Export variable # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files - echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV} - echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV} - echo "DOCKER_TAG=${DOCKER_TAG}" >> ${GITHUB_ENV} + echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV} + echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV} + echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" >> ${GITHUB_ENV} + echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" >> ${GITHUB_ENV} + echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" >> ${GITHUB_ENV} + echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" >> ${GITHUB_ENV} env: VERSION: ${{ matrix.version }} @@ -302,27 +314,36 @@ jobs: # Output echo "GIT_TYPE=${GIT_TYPE}" echo "GIT_SLUG=${GIT_SLUG}" - echo "DOCKER_TAG=${DOCKER_TAG}" + echo "DOCKER_TAG_BASE=${DOCKER_TAG_BASE}" + echo "DOCKER_TAG_MODS=${DOCKER_TAG_MODS}" + echo "DOCKER_TAG_PROD=${DOCKER_TAG_PROD}" + echo "DOCKER_TAG_WORK=${DOCKER_TAG_WORK}" + # Tag image + retry make tag OLD_TAG="${VERSION}-base" NEW_TAG="${DOCKER_TAG_BASE}" + retry make tag OLD_TAG="${VERSION}-mods" NEW_TAG="${DOCKER_TAG_MODS}" + retry make tag OLD_TAG="${VERSION}-prod" NEW_TAG="${DOCKER_TAG_PROD}" + retry make tag OLD_TAG="${VERSION}-work" NEW_TAG="${DOCKER_TAG_WORK}" docker images # Login retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} # Push - echo "retry make push-base VERSION=${DOCKER_TAG}" - echo "retry make push-mods VERSION=${DOCKER_TAG}" - echo "retry make push-prod VERSION=${DOCKER_TAG}" - echo "retry make push-work VERSION=${DOCKER_TAG}" + echo "retry make push TAG=${DOCKER_TAG_BASE}" + echo "retry make push TAG=${DOCKER_TAG_MODS}" + echo "retry make push TAG=${DOCKER_TAG_PROD}" + echo "retry make push TAG=${DOCKER_TAG_WORK}" env: + VERSION: ${{ matrix.version }} RETRIES: 20 PAUSE: 10 # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id && ( - (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) || - (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-')) ) From f0bb67cbc24a4ecd3439650d993dfd91bc95e6f0 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 14:34:10 +0100 Subject: [PATCH 08/14] Ensure to pull latest base images during CI --- .github/workflows/build.yml | 1 + .github/workflows/nightly.yml | 1 + Makefile | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b07673d..89ef72e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -120,6 +120,7 @@ jobs: done; return 1; } + retry make _pull-base-image VERSION=${VERSION} retry make build-base VERSION=${VERSION} env: VERSION: ${{ matrix.version }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index fffa989..6fcf899 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -123,6 +123,7 @@ jobs: done; return 1; } + retry make _pull-base-image VERSION=${VERSION} retry make build-base VERSION=${VERSION} env: VERSION: ${{ matrix.version }} diff --git a/Makefile b/Makefile index 74f99c6..09b5372 100644 --- a/Makefile +++ b/Makefile @@ -202,7 +202,7 @@ build-work: # REBUILD TARGETS # ------------------------------------------------------------------------------------------------- -rebuild-base: _pull-root-image +rebuild-base: _pull-base-image rebuild-base: NO_CACHE=--no-cache rebuild-base: build-base @@ -360,6 +360,6 @@ _check-image-exists: fi; -_pull-root-image: +_pull-base-image: @echo "Pulling root image for PHP ${VERSION}" @docker pull $(shell grep FROM $(DIR)/base/Dockerfile-${VERSION} | sed 's/^FROM\s*//g';) From 2d4c8647e1445ec4792e9cfdb819e6b769669083 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 14:36:49 +0100 Subject: [PATCH 09/14] Remove travis.yml config --- .travis.yml | 136 ---------------------------------------------------- 1 file changed, 136 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c5ddd44..0000000 --- a/.travis.yml +++ /dev/null @@ -1,136 +0,0 @@ ---- - -### -### Travis settings -### -sudo: required -language: minimal -services: - - docker - - -### -### Build Matrix -### -env: - global: - - IMAGE: devilbox/php-fpm - matrix: - - PHP=5.2 - - PHP=5.3 - - PHP=5.4 - - PHP=5.5 - - PHP=5.6 - - PHP=7.0 - - PHP=7.1 - - PHP=7.2 - - PHP=7.3 - - PHP=7.4 - - PHP=8.0 - - PHP=8.1 - - -### -### Install requirements -### -install: - - docker version - - # Disable services enabled by default - # http://docs.travis-ci.com/user/database-setup/#MySQL - - sudo /etc/init.d/httpd stop || true - - sudo /etc/init.d/memcached stop || true - - sudo /etc/init.d/mongodb stop || true - - sudo /etc/init.d/mysql stop || true - - sudo /etc/init.d/nginx stop || true - - sudo /etc/init.d/postgresql stop || true - - sudo /etc/init.d/redis stop || true - - - sudo service httpd stop || true - - sudo service memcached stop || true - - sudo service mongodb stop || true - - sudo service mysql stop || true - - sudo service nginx stop || true - - sudo service postgresql stop || true - - sudo service redis stop || true - - netstat -tulpn - - - retry() { - for ((n=0; n<10; n++)); do - echo "[${n}] ${*}"; - if eval "${*}"; then - return 0; - fi; - done; - return 1; - } - - -### -### Check generation changes, build and test -### -before_script: - # Build (multiple tries due to network outages) - - retry make build-base VERSION=${PHP} - #- retry make test-base VERSION=${PHP} - - - retry make build-mods VERSION=${PHP} - #- retry make test-mods VERSION=${PHP} - - - retry make build-prod VERSION=${PHP} - #- retry make test-prod VERSION=${PHP} - - - retry make build-work VERSION=${PHP} - - retry make test-work VERSION=${PHP} - - -### -### Push to Dockerhub -### -script: - - if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - retry make login USERNAME="${DOCKER_USERNAME}" PASSWORD="${DOCKER_PASSWORD}"; - if [ "${TRAVIS_BRANCH}" == "master" ]; then - echo "Pushing latest"; - retry make push TAG="${PHP}-base" && - retry make push TAG="${PHP}-mods" && - retry make push TAG="${PHP}-prod" && - retry make push TAG="${PHP}-work"; - elif [[ ${TRAVIS_BRANCH} =~ ^(release-[.0-9]+)$ ]]; then - echo "Pushing branch ${TRAVIS_BRANCH}"; - retry make tag OLD_TAG="${PHP}-base" NEW_TAG="${PHP}-base-${TRAVIS_BRANCH}" && - retry make tag OLD_TAG="${PHP}-mods" NEW_TAG="${PHP}-mods-${TRAVIS_BRANCH}" && - retry make tag OLD_TAG="${PHP}-prod" NEW_TAG="${PHP}-prod-${TRAVIS_BRANCH}" && - retry make tag OLD_TAG="${PHP}-work" NEW_TAG="${PHP}-work-${TRAVIS_BRANCH}" && - retry make push TAG="${PHP}-base-${TRAVIS_BRANCH}" && - retry make push TAG="${PHP}-mods-${TRAVIS_BRANCH}" && - retry make push TAG="${PHP}-prod-${TRAVIS_BRANCH}" && - retry make push TAG="${PHP}-work-${TRAVIS_BRANCH}"; - elif [ -n "${TRAVIS_TAG}" ]; then - echo "Pushing tag ${TRAVIS_TAG}"; - retry make tag OLD_TAG="${PHP}-base" NEW_TAG="${PHP}-base-${TRAVIS_TAG}" && - retry make tag OLD_TAG="${PHP}-mods" NEW_TAG="${PHP}-mods-${TRAVIS_TAG}" && - retry make tag OLD_TAG="${PHP}-prod" NEW_TAG="${PHP}-prod-${TRAVIS_TAG}" && - retry make tag OLD_TAG="${PHP}-work" NEW_TAG="${PHP}-work-${TRAVIS_TAG}" && - retry make push TAG="${PHP}-base-${TRAVIS_TAG}" && - retry make push TAG="${PHP}-mods-${TRAVIS_TAG}" && - retry make push TAG="${PHP}-prod-${TRAVIS_TAG}" && - retry make push TAG="${PHP}-work-${TRAVIS_TAG}"; - elif [ "${TRAVIS_EVENT_TYPE}" = "cron" ]; then - if MY_TAG="$( git describe --exact-match "$(git rev-parse HEAD)" 2>/dev/null )"; then - echo "Pushing cron tag ${MY_TAG}"; - retry make tag OLD_TAG="${PHP}-base" NEW_TAG="${PHP}-base-${MY_TAG}" && - retry make tag OLD_TAG="${PHP}-mods" NEW_TAG="${PHP}-mods-${MY_TAG}" && - retry make tag OLD_TAG="${PHP}-prod" NEW_TAG="${PHP}-prod-${MY_TAG}" && - retry make tag OLD_TAG="${PHP}-work" NEW_TAG="${PHP}-work-${MY_TAG}" && - retry make push TAG="${PHP}-base-${MY_TAG}" && - retry make push TAG="${PHP}-mods-${MY_TAG}" && - retry make push TAG="${PHP}-prod-${MY_TAG}" && - retry make push TAG="${PHP}-work-${MY_TAG}"; - fi - else - echo "Skipping push to dockerhub on normal branches"; - fi - else - echo "Skipping push to dockerhub on PR"; - fi From 66b7586eae46be0bc234f360dd364253fd4f0237 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 15:12:52 +0100 Subject: [PATCH 10/14] Add linting --- .github/workflows/linting.yml | 12 +++++++ Dockerfiles/work/data/sudo-devilbox | 1 - Makefile | 50 +++++++++++++++++++++++++++++ README.md | 2 +- 4 files changed, 63 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 21b97db..fa21886 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -33,10 +33,22 @@ jobs: # ------------------------------------------------------------ # Lint repository # ------------------------------------------------------------ + - name: Lint Files + run: | + make lint-files + + - name: Lint Yaml + run: | + make lint-yaml + - name: Lint workflow run: | make lint-workflow + - name: Lint Changelog + run: | + make lint-changelog + - name: Diff generated Docker files run: | make gen-dockerfiles diff --git a/Dockerfiles/work/data/sudo-devilbox b/Dockerfiles/work/data/sudo-devilbox index 16fc745..9547703 100644 --- a/Dockerfiles/work/data/sudo-devilbox +++ b/Dockerfiles/work/data/sudo-devilbox @@ -4,4 +4,3 @@ Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/loca # Allow devilbox user to do anything without password %devilbox ALL=(ALL) NOPASSWD: ALL - diff --git a/Makefile b/Makefile index 09b5372..3c956fc 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ endif # Docker configuration # ------------------------------------------------------------------------------------------------- +CURRENT_DIR = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) + DIR = Dockerfiles IMAGE = devilbox/php-fpm NO_CACHE = @@ -15,6 +17,11 @@ PHP_EXT_DIR = # Run checks after each module has been installed (slow, but yields errors faster) FAIL_FAST = False +# File lint +FL_VERSION = 0.3 +FL_IGNORES = .git/,.github/ + + # ------------------------------------------------------------------------------------------------- # DEFAULT TARGET # ------------------------------------------------------------------------------------------------- @@ -74,9 +81,15 @@ help: # Lint Targets # ------------------------------------------------------------------------------------------------- +lint: lint-files +lint: lint-yaml +lint: lint-changelog lint: lint-workflow lint-workflow: + @echo "################################################################################" + @echo "# Lint Workflow" + @echo "################################################################################" @\ GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \ GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \ @@ -88,6 +101,43 @@ lint-workflow: else \ echo "[OK] Git Tag present in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \ fi + @echo + +lint-changelog: + @echo "################################################################################" + @echo "# Lint Changelog" + @echo "################################################################################" + @\ + GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \ + GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \ + GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \ + if ! grep -E "^## Release $${GIT_NEXT_TAG}$$" CHANGELOG.md >/dev/null; then \ + echo "[ERR] Missing '## Release $${GIT_NEXT_TAG}' section in CHANGELOG.md"; \ + exit 1; \ + else \ + echo "[OK] Section '## Release $${GIT_NEXT_TAG}' present in CHANGELOG.md"; \ + fi + @echo + +lint-files: + @echo "################################################################################" + @echo "# Lint Files" + @echo "################################################################################" + @docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-cr --text --ignore '$(FL_IGNORES)' --path . + @docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-crlf --text --ignore '$(FL_IGNORES)' --path . + @docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-trailing-single-newline --text --ignore '$(FL_IGNORES)' --path . + @docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-trailing-space --text --ignore '$(FL_IGNORES)' --path . + @docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-utf8 --text --ignore '$(FL_IGNORES)' --path . + @docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/file-lint:$(FL_VERSION) file-utf8-bom --text --ignore '$(FL_IGNORES)' --path . + @echo + +lint-yaml: + @# Lint all files + @echo "################################################################################" + @echo "# Lint Yaml" + @echo "################################################################################" + @docker run --rm $$(tty -s && echo "-it" || echo) -v $(CURRENT_DIR):/data cytopia/yamllint . + @echo # ------------------------------------------------------------------------------------------------- diff --git a/README.md b/README.md index 3955109..40fcef0 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ One main problem with a running Docker container is to **synchronize the ownersh #### Unsynchronized permissions -Consider the following directory structure of a mounted volume. Your hosts computer uid/gid are `1000` which does not have a corresponding user/group within the container. Fortunately the `tmp/` directory allows everybody to create new files in it. +Consider the following directory structure of a mounted volume. Your hosts computer uid/gid are `1000` which does not have a corresponding user/group within the container. Fortunately the `tmp/` directory allows everybody to create new files in it. ```shell [Host] | [Container] From 0f7ea873285e07ad6602e8c9dd4bcffa26abcd6c Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 15:13:50 +0100 Subject: [PATCH 11/14] Enable push to Dockerhub --- .github/workflows/build.yml | 8 ++++---- .github/workflows/nightly.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89ef72e..3417bde 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -328,10 +328,10 @@ jobs: retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} # Push - echo "retry make push TAG=${DOCKER_TAG_BASE}" - echo "retry make push TAG=${DOCKER_TAG_MODS}" - echo "retry make push TAG=${DOCKER_TAG_PROD}" - echo "retry make push TAG=${DOCKER_TAG_WORK}" + retry make push TAG=${DOCKER_TAG_BASE} + retry make push TAG=${DOCKER_TAG_MODS} + retry make push TAG=${DOCKER_TAG_PROD} + retry make push TAG=${DOCKER_TAG_WORK} env: VERSION: ${{ matrix.version }} RETRIES: 20 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6fcf899..3f93ef0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -331,10 +331,10 @@ jobs: retry make login USERNAME=${{ secrets.DOCKERHUB_USERNAME }} PASSWORD=${{ secrets.DOCKERHUB_PASSWORD }} # Push - echo "retry make push TAG=${DOCKER_TAG_BASE}" - echo "retry make push TAG=${DOCKER_TAG_MODS}" - echo "retry make push TAG=${DOCKER_TAG_PROD}" - echo "retry make push TAG=${DOCKER_TAG_WORK}" + retry make push TAG=${DOCKER_TAG_BASE} + retry make push TAG=${DOCKER_TAG_MODS} + retry make push TAG=${DOCKER_TAG_PROD} + retry make push TAG=${DOCKER_TAG_WORK} env: VERSION: ${{ matrix.version }} RETRIES: 20 From c5e3e7257f519d5fc5448063723fe02172f67714 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 15:14:40 +0100 Subject: [PATCH 12/14] Update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2163b7c..8322aa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - Added `apcu`, `blackfire`, `igbinary`, `imap`, `mcrypt`, `memcache`, `msgpack`, `oauth`, `psr`, `solr`, `xlswriter`, `yaml` to PHP 8.0 - Added `apcu`, `igbinary`, `imap`, `mcrypt`, `memcache`, `msgpack`, `oauth`, `psr`, `solr`, `xlswriter`, `yaml` to PHP 8.1 +#### Changed +- Migrate from Travis CI to GitHub Actions + ## Release 0.121 From d93387f207b4257f01cb52b74bfc99e643c8d123 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 15:18:21 +0100 Subject: [PATCH 13/14] Adjust Readme to reflect GitHub Actions --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 40fcef0..690d282 100644 --- a/README.md +++ b/README.md @@ -977,7 +977,7 @@ If you plan to use the PHP-FPM image for development, hence being able to execut The **work** Docker image has many common tools already installed which on one hand increases its image size, but on the other hand removes the necessity to install those tools locally. -You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpcs` as well as many others, simply do it directly inside the container. As all Docker images are auto-built every night by travis-ci it is assured that you are always at the latest version of your favorite dev tool. +You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpcs` as well as many others, simply do it directly inside the container. As all Docker images are auto-built every night by GitHub Actions it is assured that you are always at the latest version of your favorite dev tool. #### What tools can you expect @@ -1283,10 +1283,9 @@ $ docker exec -it php mysqldump-secure

Automated builds

-[![Nightly](https://github.com/devilbox/docker-php-fpm/workflows/PHP-Nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly) -[![Travis](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm) +[![nightly](https://github.com/devilbox/docker-php-fpm/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly) -Docker images are built and tested every night by **[travis-ci](https://travis-ci.org/devilbox/docker-php-fpm)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches. +Docker images are built and tested every night by **[GitHub Actions](https://github.com/devilbox/docker-php-fpm/actions?workflow=nightly)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches.

Contributing

From 395e4d30b402a44b1e39ac43dbcb8739bf0e17e0 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sat, 12 Dec 2020 15:24:52 +0100 Subject: [PATCH 14/14] Repository settings --- .github/FUNDING.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..b343095 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: [cytopia] +patreon: devilbox