Skip to content

Commit

Permalink
Use official PHP 7.4 image
Browse files Browse the repository at this point in the history
  • Loading branch information
cytopia committed Dec 28, 2019
1 parent 9c1e49b commit 40d76f3
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Dockerfiles/base/Dockerfile-7.4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM devilbox/php-fpm-7.4
FROM php:7.4-fpm
MAINTAINER "cytopia" <[email protected]>


Expand Down
13 changes: 13 additions & 0 deletions Dockerfiles/mods/Dockerfile-7.3
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,17 @@ RUN set -eux \
&& true


# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
# Enabling
&& docker-php-ext-enable memcache \
&& true


# -------------------- Installing PHP Extension: memcached --------------------
RUN set -eux \
# Installation: Generic
Expand Down Expand Up @@ -871,6 +882,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^mcrypt$' \
&& php -m | grep -oiE '^msgpack$' \
&& php-fpm -m | grep -oiE '^msgpack$' \
&& php -m | grep -oiE '^memcache$' \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mongodb$' \
Expand Down
99 changes: 92 additions & 7 deletions Dockerfiles/mods/Dockerfile-7.4
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN set -eux \
libmcrypt-dev \
libmemcached-dev \
libnghttp2-dev \
libpcre3-dev \
libpng-dev \
libpq-dev \
libpspell-dev \
Expand Down Expand Up @@ -77,6 +78,17 @@ RUN set -eux \
&& true


# -------------------- Installing PHP Extension: apcu --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install apcu \
# Enabling
&& docker-php-ext-enable apcu \
&& true


# -------------------- Installing PHP Extension: bcmath --------------------
RUN set -eux \
# Installation: Generic
Expand All @@ -85,6 +97,20 @@ RUN set -eux \
&& true


# -------------------- Installing PHP Extension: blackfire --------------------
RUN set -eux \
# Installation: Generic
# Type: Custom extension
&& version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \
\
&& true


# -------------------- Installing PHP Extension: bz2 --------------------
RUN set -eux \
# Installation: Generic
Expand Down Expand Up @@ -237,6 +263,17 @@ RUN set -eux \
&& true


# -------------------- Installing PHP Extension: memcache --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install memcache \
# Enabling
&& docker-php-ext-enable memcache \
&& true


# -------------------- Installing PHP Extension: memcached --------------------
RUN set -eux \
# Installation: Version specific
Expand Down Expand Up @@ -271,6 +308,17 @@ RUN set -eux \
&& true


# -------------------- Installing PHP Extension: oauth --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install oauth \
# Enabling
&& docker-php-ext-enable oauth \
&& true


# -------------------- Installing PHP Extension: oci8 --------------------
RUN set -eux \
# Generic pre-command
Expand Down Expand Up @@ -389,6 +437,32 @@ RUN set -eux \
&& true


# -------------------- Installing PHP Extension: psr --------------------
RUN set -eux \
# Installation: Generic
# Type: PECL extension
# Default: Pecl command
&& pecl install psr \
# Enabling
&& docker-php-ext-enable psr \
&& true


# -------------------- Installing PHP Extension: phalcon --------------------
RUN set -eux \
# Installation: Generic
# Type: GIT extension
&& git clone https://github.com/phalcon/cphalcon /tmp/phalcon \
&& cd /tmp/phalcon \
# Custom: Branch
&& git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep -E '^v[.0-9]+$' | tail -1) \
# Custom: Install command
&& cd build && ./install \
# Enabling
&& docker-php-ext-enable phalcon \
&& true


# -------------------- Installing PHP Extension: pspell --------------------
RUN set -eux \
# Installation: Generic
Expand Down Expand Up @@ -448,10 +522,9 @@ RUN set -eux \

# -------------------- Installing PHP Extension: soap --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure soap --with-libxml-dir=/usr \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \
&& true

Expand Down Expand Up @@ -549,10 +622,11 @@ RUN set -eux \

# -------------------- Installing PHP Extension: xmlrpc --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \
&& docker-php-ext-configure xmlrpc --with-iconv-dir=/usr \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \
&& true

Expand All @@ -567,10 +641,11 @@ RUN set -eux \

# -------------------- Installing PHP Extension: zip --------------------
RUN set -eux \
# Installation: Generic
# Installation: Version specific
# Type: Built-in extension
# Custom: configure command
&& docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \
&& docker-php-ext-configure zip --with-zip \
# Installation
&& docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
&& true

Expand Down Expand Up @@ -697,6 +772,8 @@ RUN set -eux \
\
&& php -m | grep -oiE '^amqp$' \
&& php-fpm -m | grep -oiE '^amqp$' \
&& php -m | grep -oiE '^apcu$' \
&& php-fpm -m | grep -oiE '^apcu$' \
&& php -m | grep -oiE '^bcmath$' \
&& php-fpm -m | grep -oiE '^bcmath$' \
&& php -m | grep -oiE '^bz2$' \
Expand Down Expand Up @@ -751,6 +828,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^mcrypt$' \
&& php -m | grep -oiE '^msgpack$' \
&& php-fpm -m | grep -oiE '^msgpack$' \
&& php -m | grep -oiE '^memcache$' \
&& php-fpm -m | grep -oiE '^memcache$' \
&& php -m | grep -oiE '^memcached$' \
&& php-fpm -m | grep -oiE '^memcached$' \
&& php -m | grep -oiE '^mongodb$' \
Expand All @@ -759,6 +838,8 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^mysqli$' \
&& php -m | grep -oiE '^mysqlnd$' \
&& php-fpm -m | grep -oiE '^mysqlnd$' \
&& php -m | grep -oiE '^oauth$' \
&& php-fpm -m | grep -oiE '^oauth$' \
&& php -m | grep -oiE '^oci8$' \
&& php-fpm -m | grep -oiE '^oci8$' \
&& php -m | grep -oiE '^Zend Opcache$' \
Expand All @@ -785,6 +866,10 @@ RUN set -eux \
&& php-fpm -m | grep -oiE '^pdo_sqlite$' \
&& php -m | grep -oiE '^pgsql$' \
&& php-fpm -m | grep -oiE '^pgsql$' \
&& php -m | grep -oiE '^psr$' \
&& php-fpm -m | grep -oiE '^psr$' \
&& php -m | grep -oiE '^phalcon$' \
&& php-fpm -m | grep -oiE '^phalcon$' \
&& php -m | grep -oiE '^phar$' \
&& php-fpm -m | grep -oiE '^phar$' \
&& php -m | grep -oiE '^posix$' \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,12 @@ Check out this table to see which Docker image provides what PHP modules.
<tr>
<th>7.3</th>
<td id="73-base">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</td>
<td id="73-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="73-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, ioncube, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pdo_sqlsrv, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, sqlsrv, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.4</th>
<td id="74-base">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</td>
<td id="74-mods">amqp, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, intl, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, msgpack, mysqli, mysqlnd, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
<td id="74-mods">amqp, apcu, bcmath, blackfire, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, FFI, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, mysqli, mysqlnd, OAuth, oci8, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_OCI, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, psr, rdkafka, readline, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>8.0</th>
Expand Down
2 changes: 0 additions & 2 deletions build/ansible/DOCKERFILES/Dockerfile-base.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
FROM devilbox/php-fpm-5.2
{% elif php_version == 5.3 %}
FROM devilbox/php-fpm-5.3
{% elif php_version == 7.4 %}
FROM devilbox/php-fpm-7.4
{% elif php_version == 8.0 %}
FROM devilbox/php-fpm-8.0
{% else %}
Expand Down
20 changes: 14 additions & 6 deletions build/ansible/group_vars/all/mods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ extensions_available:
build_dep: [librabbitmq-dev]
run_dep: [librabbitmq4]
apcu:
disabled: [5.2, 7.4, 8.0]
disabled: [5.2, 8.0]
5.3:
type: pecl
version: 4.0.11
Expand All @@ -181,7 +181,7 @@ extensions_available:
all:
type: builtin
blackfire:
disabled: [5.2, 5.3, 5.4, 5.5, 7.4, 8.0]
disabled: [5.2, 5.3, 5.4, 5.5, 8.0]
all:
type: custom
command: |
Expand Down Expand Up @@ -430,7 +430,7 @@ extensions_available:
run_dep: [libmcrypt4]
build_dep: [libmcrypt-dev]
memcache:
disabled: [7.3, 7.4, 8.0]
disabled: [8.0]
5.2:
type: pecl
version: 2.2.7
Expand Down Expand Up @@ -578,7 +578,7 @@ extensions_available:
disabled: [5.2]
already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
oauth:
disabled: [7.4, 8.0]
disabled: [8.0]
5.2:
type: pecl
version: 1.2.3
Expand Down Expand Up @@ -722,7 +722,7 @@ extensions_available:
build_dep: [libpq-dev]
run_dep: [libpq5]
psr:
disabled: [5.2, 5.3, 7.4, 8.0] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module
disabled: [5.2, 5.3, 8.0] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module
5.4:
type: pecl
version: 0.5.1
Expand All @@ -735,7 +735,7 @@ extensions_available:
all:
type: pecl
phalcon:
disabled: [5.2, 7.4, 8.0] # TODO: currently disabled for 7.4 as it breaks
disabled: [5.2, 8.0] # TODO: currently disabled for 7.4 as it breaks
5.3:
type: git
git_url: https://github.com/phalcon/cphalcon
Expand Down Expand Up @@ -879,6 +879,8 @@ extensions_available:
run_dep: [snmp]
soap:
already_avail: [5.2]
7.4:
type: builtin
all:
type: builtin
configure: --with-libxml-dir=/usr
Expand Down Expand Up @@ -1063,6 +1065,9 @@ extensions_available:
xmlreader:
already_avail: "{{ php_all_versions }}"
xmlrpc:
7.4:
type: builtin
configure: --with-iconv-dir=/usr
all:
type: builtin
configure: --with-libxml-dir=/usr --with-iconv-dir=/usr
Expand Down Expand Up @@ -1095,6 +1100,9 @@ extensions_available:
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr
build_dep: [zlib1g-dev]
run_dep: []
7.4:
type: builtin
configure: --with-zip
all:
type: builtin
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip
Expand Down

0 comments on commit 40d76f3

Please sign in to comment.