diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index 7d1f0e4..a46dd42 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -79,6 +79,7 @@ jobs: - '7.3' - '7.4' - '8.0' + - '8.1' steps: # ------------------------------------------------------------ diff --git a/.github/workflows/php-nightly.yml b/.github/workflows/php-nightly.yml index d403e49..fa804d1 100644 --- a/.github/workflows/php-nightly.yml +++ b/.github/workflows/php-nightly.yml @@ -79,9 +79,10 @@ jobs: - '7.3' - '7.4' - '8.0' + - '8.1' refs: - 'master' - - '0.113' + - '0.114' steps: # ------------------------------------------------------------ diff --git a/.travis.yml b/.travis.yml index 21ca3f1..c5ddd44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ env: - PHP=7.3 - PHP=7.4 - PHP=8.0 + - PHP=8.1 ### diff --git a/CHANGELOG.md b/CHANGELOG.md index 61ab03d..da0cd75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,11 @@ ## Release 0.114 #### Fixed +- Use latest PHP 8.0 image - Disabled gd-jis: https://bugs.php.net/bug.php?id=73582 #### Added +- Add PHP 8.1 - PHP module mongodb is added to PHP 8.0 #### Changed diff --git a/Dockerfiles/base/Dockerfile-8.1 b/Dockerfiles/base/Dockerfile-8.1 new file mode 100644 index 0000000..01d07d0 --- /dev/null +++ b/Dockerfiles/base/Dockerfile-8.1 @@ -0,0 +1,104 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. +FROM devilbox/php-fpm-8.1 +MAINTAINER "cytopia" + + +### +### Labels +### +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.vendor"="devilbox" +LABEL "org.opencontainers.image.licenses"="MIT" +LABEL "org.opencontainers.image.ref.name"="8.1-base" +LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-base" +LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-base" + + +### +### Envs +### +ENV MY_USER="devilbox" \ + MY_GROUP="devilbox" \ + MY_UID="1000" \ + MY_GID="1000" \ + PHP_VERSION="8.1" + + +### +### User/Group +### +RUN set -eux \ + && groupadd -g ${MY_GID} -r ${MY_GROUP} \ + && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} + + +### +### Upgrade (install ps) +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests procps \ + && rm -rf /var/lib/apt/lists/* + + +### +### Configure +### +RUN set -eux \ + && rm -rf /usr/local/etc/php-fpm.d \ + && mkdir -p /usr/local/etc/php-fpm.d \ + && mkdir -p /var/lib/php/session \ + && mkdir -p /var/lib/php/wsdlcache \ + && chown -R devilbox:devilbox /var/lib/php/session \ + && chown -R devilbox:devilbox /var/lib/php/wsdlcache + + +### +### Copy files +### +COPY ./data/php-ini.d/php-8.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini +COPY ./data/php-fpm.conf/php-fpm-8.1.conf /usr/local/etc/php-fpm.conf + +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d /docker-entrypoint.d + + +### +### Verify +### +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \ + && /usr/local/sbin/php-fpm --test \ + \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +CMD ["/usr/local/sbin/php-fpm"] +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/data/php-fpm.conf/php-fpm-8.1.conf b/Dockerfiles/base/data/php-fpm.conf/php-fpm-8.1.conf new file mode 100644 index 0000000..b743989 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.conf/php-fpm-8.1.conf @@ -0,0 +1,134 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Backlog configuration +; ############################################################ + +[www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 1024 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + +[global] +include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 diff --git a/Dockerfiles/base/data/php-ini.d/php-8.1.ini b/Dockerfiles/base/data/php-ini.d/php-8.1.ini new file mode 100644 index 0000000..dc5fdee --- /dev/null +++ b/Dockerfiles/base/data/php-ini.d/php-8.1.ini @@ -0,0 +1,49 @@ +; ############################################################ +; # Devilbox PHP defaults for 8.1-base +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = Off +display_startup_errors = Off +log_errors = On +html_errors = Off + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Dockerfiles/mods/Dockerfile-8.1 b/Dockerfiles/mods/Dockerfile-8.1 new file mode 100644 index 0000000..f75dcfa --- /dev/null +++ b/Dockerfiles/mods/Dockerfile-8.1 @@ -0,0 +1,725 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. +FROM devilbox/php-fpm:8.1-base as builder + + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + alien \ + firebird-dev \ + freetds-dev \ + libaio-dev \ + libbz2-dev \ + libenchant-dev \ + libevent-dev \ + libfbclient2 \ + libfreetype6-dev \ + libgmp-dev \ + libib-util \ + libicu-dev \ + libjpeg-dev \ + libldap2-dev \ + libmemcached-dev \ + libpng-dev \ + libpq-dev \ + libpspell-dev \ + libsasl2-dev \ + libsnmp-dev \ + libsodium-dev \ + libssl-dev \ + libtidy-dev \ + libvpx-dev \ + libwebp-dev \ + libxml2-dev \ + libxpm-dev \ + libxslt-dev \ + libzip-dev \ + snmp \ + zlib1g-dev \ + ca-certificates \ + git + + +# Fix timezone (only required for testing to stop php -v and php-fpm -v from complaining to stderr) +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini + + +### +### Install and enable PHP modules +### +# Enable ffi if it exists +RUN set -eux \ + && if [ -f /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini ]; then \ + echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ + fi + +# -------------------- Installing PHP Extension: bcmath -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && true + + +# -------------------- Installing PHP Extension: bz2 -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && true + + +# -------------------- Installing PHP Extension: calendar -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && true + + +# -------------------- Installing PHP Extension: dba -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && true + + +# -------------------- Installing PHP Extension: enchant -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && true + + +# -------------------- Installing PHP Extension: exif -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && true + + +# -------------------- Installing PHP Extension: gd -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ \ + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + && true + + +# -------------------- Installing PHP Extension: gettext -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && true + + +# -------------------- Installing PHP Extension: gmp -------------------- +RUN set -eux \ + # Generic pre-command + && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ + && true + + +# -------------------- Installing PHP Extension: intl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ + && true + + +# -------------------- Installing PHP Extension: ldap -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + && true + + +# -------------------- Installing PHP Extension: memcached -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/php-memcached-dev/php-memcached /tmp/memcached \ + && cd /tmp/memcached \ + # Custom: Branch + && git checkout master \ + # Custom: Install command + && true \ +# FIXME: This is a work-around to mitigate compile error with PHP 8.1 +&& sed -i'' 's/\sTSRMLS_CC//g' php_memcached_session.c \ +&& phpize \ +&& ./configure --enable-memcached \ +&& make -j$(getconf _NPROCESSORS_ONLN) \ +&& make install \ + \ + # Enabling + && docker-php-ext-enable memcached \ + && true + + +# -------------------- 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 \ + \ + # Enabling + && docker-php-ext-enable mongodb \ + && true + + +# -------------------- Installing PHP Extension: mysqli -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && true + + +# -------------------- Installing PHP Extension: oci8 -------------------- +RUN set -eux \ + # Generic pre-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) oci8 \ + # Generic post-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +# -------------------- Installing PHP Extension: opcache -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) opcache \ + && true + + +# -------------------- Installing PHP Extension: pcntl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + && true + + +# -------------------- Installing PHP Extension: pdo_dblib -------------------- +RUN set -eux \ + # Generic pre-command + && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && true + + +# -------------------- Installing PHP Extension: pdo_firebird -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && true + + +# -------------------- Installing PHP Extension: pdo_mysql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && true + + +# -------------------- Installing PHP Extension: pdo_oci -------------------- +RUN set -eux \ + # Generic pre-command + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +\ +&& rpm --import http://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& curl -o /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ + https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& alien -i /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-basiclite-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& rm -f /tmp/oracle-instantclient${ORACLE_VERSION_MAJOR}-devel-${ORACLE_VERSION_FULL}.x86_64.rpm \ +&& (ln -s /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + # Installation: Version specific + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/,${ORACLE_VERSION_MAJOR} \ + # Installation + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_oci \ + && true + + +# -------------------- Installing PHP Extension: pdo_pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ + && true + + +# -------------------- Installing PHP Extension: pgsql -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + && true + + +# -------------------- Installing PHP Extension: pspell -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && true + + +# -------------------- Installing PHP Extension: redis -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: GIT extension + && git clone https://github.com/phpredis/phpredis /tmp/redis \ + && cd /tmp/redis \ + # 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) \ + # Custom: Install command + && sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \ +&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' library.c \ +&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' redis_array_impl.c \ +&& sed -i'' 's|.*sctx->cb\.no_separation.*||g' cluster_library.c \ +&& sed -i'' 's|.*->no_separation.*||g' redis_array_impl.c \ +&& phpize \ +&& ./configure --enable-redis \ +&& make -j$(getconf _NPROCESSORS_ONLN) \ +&& make install \ + \ + # Enabling + && docker-php-ext-enable redis \ + && true + + +# -------------------- Installing PHP Extension: shmop -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ + && true + + +# -------------------- Installing PHP Extension: snmp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure snmp --with-openssl-dir \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + && true + + +# -------------------- Installing PHP Extension: soap -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + # Custom: configure command + && docker-php-ext-configure soap --with-libxml-dir=/usr \ + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + && true + + +# -------------------- Installing PHP Extension: sockets -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + && true + + +# -------------------- Installing PHP Extension: sodium -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \ + && true + + +# -------------------- Installing PHP Extension: sysvmsg -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + && true + + +# -------------------- Installing PHP Extension: sysvsem -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + && true + + +# -------------------- Installing PHP Extension: sysvshm -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + && true + + +# -------------------- Installing PHP Extension: tidy -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ + && true + + +# -------------------- 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 \ + # Default: Install command + && phpize \ + && ./configure --enable-xdebug \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ + # Enabling + && docker-php-ext-enable xdebug \ + && true + + +# -------------------- Installing PHP Extension: xsl -------------------- +RUN set -eux \ + # Installation: Generic + # Type: Built-in extension + && docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + && true + + +# -------------------- Installing PHP Extension: zip -------------------- +RUN set -eux \ + # Installation: Generic + # 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-install -j$(getconf _NPROCESSORS_ONLN) zip \ + && true + + + + +# Fix php.ini settings for enabled extensions +RUN set -eux \ + && chmod +x "$(php -r 'echo ini_get("extension_dir");')"/* + +# Fix oracle dir for images that don't have oci installed +RUN set -eux \ + && mkdir -p /usr/lib/oracle/ + +# Shrink everything down +RUN set -eux \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + + +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. +FROM devilbox/php-fpm:8.1-base as final +MAINTAINER "cytopia" + +### +### Labels +### +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.vendor"="devilbox" +LABEL "org.opencontainers.image.licenses"="MIT" +LABEL "org.opencontainers.image.ref.name"="8.1-mods" +LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-mods" +LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-mods" + + +### +### Copy artifacts from builder +### +ARG EXT_DIR +COPY --from=builder ${EXT_DIR}/ ${EXT_DIR}/ +COPY --from=builder /usr/local/etc/php/conf.d/ /usr/local/etc/php/conf.d/ +COPY --from=builder /usr/local/bin/ /usr/local/bin/ +COPY --from=builder /usr/local/lib/ /usr/local/lib/ +COPY --from=builder /usr/lib/oracle/ /usr/lib/oracle/ + + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libaio1 \ + libaspell15 \ + libenchant1c2a \ + libfbclient2 \ + libffi6 \ + libfreetype6 \ + libicu63 \ + libjpeg62-turbo \ + libmemcachedutil2 \ + libpng16-16 \ + libpq5 \ + libsybdb5 \ + libtidy5deb1 \ + libvpx5 \ + libwebp6 \ + libxpm4 \ + libxslt1.1 \ + libzip4 \ + snmp \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* \ + \ + && update-ca-certificates + + +### +### Post Install +### +RUN set -eux \ + # ---------- oci8 ---------- + && ORACLE_HREF="$( curl -sS https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/ | tac | tac | grep -Eo 'href="getPackage/oracle-instantclient.+basiclite.+rpm"' | tail -1 )" \ +&& ORACLE_VERSION_MAJOR="$( echo "${ORACLE_HREF}" | grep -Eo 'instantclient[.0-9]+' | sed 's/instantclient//g' )" \ +&& ORACLE_VERSION_FULL="$( echo "${ORACLE_HREF}" | grep -Eo 'basiclite-[-.0-9]+' | sed -e 's/basiclite-//g' -e 's/\.$//g' )" \ +&& (ln -sf /usr/lib/oracle/${ORACLE_VERSION_MAJOR}/client64/lib/*.so* /usr/lib/ || true) \ + \ + && true + + +### +### Verify +### +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \ + && /usr/local/sbin/php-fpm --test \ + \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini \ + \ + && php -m | grep -oiE '^bcmath$' \ + && php-fpm -m | grep -oiE '^bcmath$' \ + && php -m | grep -oiE '^bz2$' \ + && php-fpm -m | grep -oiE '^bz2$' \ + && php -m | grep -oiE '^calendar$' \ + && php-fpm -m | grep -oiE '^calendar$' \ + && php -m | grep -oiE '^ctype$' \ + && php-fpm -m | grep -oiE '^ctype$' \ + && php -m | grep -oiE '^curl$' \ + && php-fpm -m | grep -oiE '^curl$' \ + && php -m | grep -oiE '^dba$' \ + && php-fpm -m | grep -oiE '^dba$' \ + && php -m | grep -oiE '^dom$' \ + && php-fpm -m | grep -oiE '^dom$' \ + && php -m | grep -oiE '^enchant$' \ + && php-fpm -m | grep -oiE '^enchant$' \ + && php -m | grep -oiE '^exif$' \ + && php-fpm -m | grep -oiE '^exif$' \ + && php -m | grep -oiE '^ffi$' \ + && php-fpm -m | grep -oiE '^ffi$' \ + && php -m | grep -oiE '^fileinfo$' \ + && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^filter$' \ + && php-fpm -m | grep -oiE '^filter$' \ + && php -m | grep -oiE '^ftp$' \ + && php-fpm -m | grep -oiE '^ftp$' \ + && php -m | grep -oiE '^gd$' \ + && php-fpm -m | grep -oiE '^gd$' \ + && php -m | grep -oiE '^gettext$' \ + && php-fpm -m | grep -oiE '^gettext$' \ + && php -m | grep -oiE '^gmp$' \ + && php-fpm -m | grep -oiE '^gmp$' \ + && php -m | grep -oiE '^hash$' \ + && php-fpm -m | grep -oiE '^hash$' \ + && php -m | grep -oiE '^iconv$' \ + && php-fpm -m | grep -oiE '^iconv$' \ + && php -m | grep -oiE '^intl$' \ + && php-fpm -m | grep -oiE '^intl$' \ + && php -m | grep -oiE '^json$' \ + && php-fpm -m | grep -oiE '^json$' \ + && php -m | grep -oiE '^ldap$' \ + && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^libxml$' \ + && php-fpm -m | grep -oiE '^libxml$' \ + && php -m | grep -oiE '^mbstring$' \ + && php-fpm -m | grep -oiE '^mbstring$' \ + && php -m | grep -oiE '^memcached$' \ + && php-fpm -m | grep -oiE '^memcached$' \ + && php -m | grep -oiE '^mongodb$' \ + && php-fpm -m | grep -oiE '^mongodb$' \ + && php -m | grep -oiE '^mysqli$' \ + && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^mysqlnd$' \ + && php-fpm -m | grep -oiE '^mysqlnd$' \ + && php -m | grep -oiE '^oci8$' \ + && php-fpm -m | grep -oiE '^oci8$' \ + && php -m | grep -oiE '^Zend Opcache$' \ + && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^openssl$' \ + && php-fpm -m | grep -oiE '^openssl$' \ + && php -m | grep -oiE '^pcntl$' \ + && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pcre$' \ + && php-fpm -m | grep -oiE '^pcre$' \ + && php -m | grep -oiE '^pdo$' \ + && php-fpm -m | grep -oiE '^pdo$' \ + && php -m | grep -oiE '^pdo_dblib$' \ + && php-fpm -m | grep -oiE '^pdo_dblib$' \ + && php -m | grep -oiE '^pdo_firebird$' \ + && php-fpm -m | grep -oiE '^pdo_firebird$' \ + && php -m | grep -oiE '^pdo_mysql$' \ + && php-fpm -m | grep -oiE '^pdo_mysql$' \ + && php -m | grep -oiE '^pdo_oci$' \ + && php-fpm -m | grep -oiE '^pdo_oci$' \ + && php -m | grep -oiE '^pdo_pgsql$' \ + && php-fpm -m | grep -oiE '^pdo_pgsql$' \ + && php -m | grep -oiE '^pdo_sqlite$' \ + && php-fpm -m | grep -oiE '^pdo_sqlite$' \ + && php -m | grep -oiE '^pgsql$' \ + && php-fpm -m | grep -oiE '^pgsql$' \ + && php -m | grep -oiE '^phar$' \ + && php-fpm -m | grep -oiE '^phar$' \ + && php -m | grep -oiE '^posix$' \ + && php-fpm -m | grep -oiE '^posix$' \ + && php -m | grep -oiE '^pspell$' \ + && php-fpm -m | grep -oiE '^pspell$' \ + && php -m | grep -oiE '^readline$' \ + && php -m | grep -oiE '^redis$' \ + && php-fpm -m | grep -oiE '^redis$' \ + && php -m | grep -oiE '^reflection$' \ + && php-fpm -m | grep -oiE '^reflection$' \ + && php -m | grep -oiE '^session$' \ + && php-fpm -m | grep -oiE '^session$' \ + && php -m | grep -oiE '^shmop$' \ + && php-fpm -m | grep -oiE '^shmop$' \ + && php -m | grep -oiE '^simplexml$' \ + && php-fpm -m | grep -oiE '^simplexml$' \ + && php -m | grep -oiE '^snmp$' \ + && php-fpm -m | grep -oiE '^snmp$' \ + && php -m | grep -oiE '^soap$' \ + && php-fpm -m | grep -oiE '^soap$' \ + && php -m | grep -oiE '^sockets$' \ + && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^sodium$' \ + && php-fpm -m | grep -oiE '^sodium$' \ + && php -m | grep -oiE '^spl$' \ + && php-fpm -m | grep -oiE '^spl$' \ + && php -m | grep -oiE '^sysvmsg$' \ + && php-fpm -m | grep -oiE '^sysvmsg$' \ + && php -m | grep -oiE '^sysvsem$' \ + && php-fpm -m | grep -oiE '^sysvsem$' \ + && php -m | grep -oiE '^sysvshm$' \ + && php-fpm -m | grep -oiE '^sysvshm$' \ + && php -m | grep -oiE '^tidy$' \ + && php-fpm -m | grep -oiE '^tidy$' \ + && php -m | grep -oiE '^tokenizer$' \ + && php-fpm -m | grep -oiE '^tokenizer$' \ + && php -m | grep -oiE '^xdebug$' \ + && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xml$' \ + && php-fpm -m | grep -oiE '^xml$' \ + && php -m | grep -oiE '^xmlreader$' \ + && php-fpm -m | grep -oiE '^xmlreader$' \ + && php -m | grep -oiE '^xmlwriter$' \ + && php-fpm -m | grep -oiE '^xmlwriter$' \ + && php -m | grep -oiE '^xsl$' \ + && php-fpm -m | grep -oiE '^xsl$' \ + && php -m | grep -oiE '^zip$' \ + && php-fpm -m | grep -oiE '^zip$' \ + && true + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +CMD ["/usr/local/sbin/php-fpm"] +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-8.1 b/Dockerfiles/prod/Dockerfile-8.1 new file mode 100644 index 0000000..d09ea53 --- /dev/null +++ b/Dockerfiles/prod/Dockerfile-8.1 @@ -0,0 +1,97 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead. +FROM devilbox/php-fpm:8.1-mods +MAINTAINER "cytopia" + + +### +### Labels +### +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.vendor"="devilbox" +LABEL "org.opencontainers.image.licenses"="MIT" +LABEL "org.opencontainers.image.ref.name"="8.1-prod" +LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-prod" +LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-prod" + + +### +### Install +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + locales-all \ + postfix \ + postfix-pcre \ + cron \ + rsyslog \ + socat \ + supervisor \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ + && rm -rf /etc/supervisor* \ + && mkdir -p /etc/supervisor/conf.d \ + && mkdir -p /var/log/supervisor \ + \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + +### +### Verify +### +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \ + && /usr/local/sbin/php-fpm --test \ + \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini + + +### +### Copy files +### +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ +COPY ./data/postfix.sh /usr/local/sbin/postfix.sh +COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf + + +### +### Volumes +### +VOLUME /var/log/php +VOLUME /var/mail + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-8.1 b/Dockerfiles/work/Dockerfile-8.1 new file mode 100644 index 0000000..1997ea8 --- /dev/null +++ b/Dockerfiles/work/Dockerfile-8.1 @@ -0,0 +1,560 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead. +FROM devilbox/php-fpm:8.1-prod +MAINTAINER "cytopia" + + +### +### Labels +### +# https://github.com/opencontainers/image-spec/blob/master/annotations.md +#LABEL "org.opencontainers.image.created"="" +#LABEL "org.opencontainers.image.version"="" +#LABEL "org.opencontainers.image.revision"="" +LABEL "maintainer"="cytopia " +LABEL "org.opencontainers.image.authors"="cytopia " +LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm" +LABEL "org.opencontainers.image.vendor"="devilbox" +LABEL "org.opencontainers.image.licenses"="MIT" +LABEL "org.opencontainers.image.ref.name"="8.1-work" +LABEL "org.opencontainers.image.title"="PHP-FPM 8.1-work" +LABEL "org.opencontainers.image.description"="PHP-FPM 8.1-work" + + +### +### Envs +### +ENV BASH_PROFILE=".bashrc" + + +### +### Install Tools +### +RUN set -eux \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests apt-utils \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + curl \ + dirmngr \ + gnupg \ + \ + && echo "deb http://ftp.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list \ + && curl -sS -L --fail "https://packages.blackfire.io/gpg.key" 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ + && echo "deb http://packages.blackfire.io/debian any main" > /etc/apt/sources.list.d/blackfire.list \ + && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \ + && echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main" > /etc/apt/sources.list.d/git.list \ + && APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 \ + && echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.0 main" > /etc/apt/sources.list.d/mongo.list \ + && curl -sS -L --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ + && echo "deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ + && curl -sS -L --fail https://dl.yarnpkg.com/debian/pubkey.gpg 2>/dev/null | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \ + && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ + \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + ack-grep \ + aspell \ + autoconf \ + automake \ + bash-completion \ + binutils \ + blackfire-agent \ + build-essential \ + bzip2 \ + certbot \ + coreutils \ + dnsutils \ + dos2unix \ + file \ + gawk \ + gcc \ + git \ + git-flow \ + git-svn \ + ghostscript \ + graphviz \ + gsfonts \ + hostname \ + htop \ + imagemagick \ + iputils-ping \ + jq \ + less \ + libc-dev \ + libffi-dev \ + libssl-dev \ + libyaml-dev \ + locales \ + make \ + mongodb-org-shell \ + mongodb-org-tools \ + moreutils \ + mariadb-client \ + mupdf \ + mupdf-tools \ + nano \ + net-tools \ + netcat \ + openssh-client \ + patch \ + patchelf \ + postgresql-client \ + redis-tools \ + rsync \ + rubygems \ + ruby-dev \ + shellcheck \ + silversearcher-ag \ + subversion \ + sudo \ + tig \ + tree \ + unzip \ + vim \ + w3m \ + wget \ + whois \ + xz-utils \ + yarn \ + zip \ + zlib1g-dev \ + zsh \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ + && rm -rf /var/lib/apt/lists/* \ + \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + +### +### Install custom software +### +RUN set -eux \ +# -------------------- composer -------------------- + && curl -sS -L --fail https://getcomposer.org/composer-1.phar > /usr/local/bin/composer-1 \ +&& curl -sS -L --fail https://getcomposer.org/composer-2.phar > /usr/local/bin/composer-2 \ +&& chmod +x /usr/local/bin/composer-1 \ +&& chmod +x /usr/local/bin/composer-2 \ +&& ln -sf /usr/local/bin/composer-2 /usr/local/bin/composer \ + \ + \ +# -------------------- pip -------------------- + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libpython-dev \ +&& DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ +&& rm -rf /var/lib/apt/lists/* \ +\ +&& curl -sS -L --fail https://bootstrap.pypa.io/get-pip.py | python \ + \ + \ +# -------------------- nvm -------------------- + && git clone https://github.com/creationix/nvm /opt/nvm \ +&& cd /opt/nvm \ +&& git checkout "$(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1))" \ +\ +&& { \ + echo 'export NVM_DIR="/opt/nvm"'; \ + echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm'; \ + echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion'; \ +} >> /home/devilbox/.bashrc \ +\ +&& chown -R devilbox:devilbox /opt/nvm \ + \ + && su -c '. /opt/nvm/nvm.sh; nvm install node' devilbox \ +&& su -c '. /opt/nvm/nvm.sh; nvm install --lts' devilbox \ +&& su -c '. /opt/nvm/nvm.sh; nvm use node' devilbox \ + \ + \ +# -------------------- awesomeci -------------------- + && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ +&& cd /usr/local/src/awesome-ci \ +&& git checkout $(git describe --abbrev=0 --tags) \ +&& ./configure --prefix=/usr/local \ +&& make install \ +&& cd / \ +&& rm -rf /usr/local/src/awesome-ci \ + \ + \ +# -------------------- deployer -------------------- + && curl -sS -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep \ + && chmod +x /usr/local/bin/dep \ + \ +# -------------------- gitflow -------------------- + && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ +&& cd /tmp/gitflow \ +&& make install \ +&& cd / && rm -rf /tmp/gitflow \ + \ + \ +# -------------------- linkcheck -------------------- + && curl -sS -L --fail https://raw.githubusercontent.com/cytopia/linkcheck/master/linkcheck > /usr/local/bin/linkcheck \ +&& chmod +x /usr/local/bin/linkcheck \ + \ + \ +# -------------------- linuxbrew -------------------- + && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ +&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ +&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ + \ + \ +# -------------------- mhsendmail -------------------- + && curl -sS -L --fail https://github.com/devilbox/mhsendmail/releases/download/v0.3.0/mhsendmail_linux_amd64 > mhsendmail_linux_amd64 \ +&& chmod +x mhsendmail_linux_amd64 \ +&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmail \ + \ + \ +# -------------------- mysqldumpsecure -------------------- + && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ +&& cd /usr/local/src/mysqldump-secure \ +&& git checkout $(git describe --abbrev=0 --tags) \ +&& cp /usr/local/src/mysqldump-secure/bin/mysqldump-secure /usr/local/bin \ +&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.conf /etc \ +&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.cnf /etc \ +&& touch /var/log/mysqldump-secure.log \ +&& chown ${MY_USER}:${MY_GROUP} /etc/mysqldump-secure.* \ +&& chown ${MY_USER}:${MY_GROUP} /var/log/mysqldump-secure.log \ +&& chmod 0400 /etc/mysqldump-secure.conf \ +&& chmod 0400 /etc/mysqldump-secure.cnf \ +&& chmod 0644 /var/log/mysqldump-secure.log \ +&& sed -i'' 's/^COMPRESS_ARG=.*/COMPRESS_ARG="-9 -c"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_DIR=.*/DUMP_DIR="\/shared\/backups\/mysql"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_DIR_CHMOD=.*/DUMP_DIR_CHMOD="0755"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_FILE_CHMOD=.*/DUMP_FILE_CHMOD="0644"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^LOG_CHMOD=.*/LOG_CHMOD="0644"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^NAGIOS_LOG=.*/NAGIOS_LOG=0/g' /etc/mysqldump-secure.conf \ +&& cd / \ +&& rm -rf /usr/local/src/mysqldump-secure \ + \ + \ +# -------------------- phpcs -------------------- + && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ +&& chmod +x /usr/local/bin/phpcs \ + \ + \ +# -------------------- phpcbf -------------------- + && curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ +&& chmod +x /usr/local/bin/phpcbf \ + \ + \ +# -------------------- phpmd -------------------- + && curl -sS -L --fail https://phpmd.org/static/latest/phpmd.phar > phpmd.phar \ +&& mv phpmd.phar /usr/local/bin/phpmd \ +&& chmod +x /usr/local/bin/phpmd \ + \ + \ +# -------------------- symfony -------------------- + && SYMFONY_VERSION="$( curl -sS -L --fail https://get.symfony.com/cli/LATEST )" \ + && curl -sS -L --fail "https://github.com/symfony/cli/releases/download/v${SYMFONY_VERSION}/symfony_linux_amd64" > /usr/local/bin/symfony \ + && chmod +x /usr/local/bin/symfony \ + \ +# -------------------- wkhtmltopdf -------------------- + && VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" \ + && DEBIAN_FRONTEND=noninteractive apt-get update -qq \ +&& DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ +&& curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ +&& dpkg -i /tmp/wkhtmltopdf.deb \ +&& rm -f /tmp/wkhtmltopdf.deb \ + \ + && DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false apt-utils \ +&& rm -rf /var/lib/apt/lists/* \ + \ + \ +# -------------------- wpcli -------------------- + && curl -sS -L --fail https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ + && chmod +x /usr/local/bin/wp \ + \ +# -------------------- cleanup -------------------- + && rm -rf /home/${MY_USER}/.*json \ +&& rm -rf /home/${MY_USER}/.cache \ +&& rm -rf /home/${MY_USER}/.composer \ +&& rm -rf /home/${MY_USER}/.config \ +&& rm -rf /home/${MY_USER}/.drush \ +&& rm -rf /home/${MY_USER}/.subversion \ +&& rm -rf /home/${MY_USER}/.v8* \ +\ +&& rm -rf /root/.*json \ +&& rm -rf /root/.cache \ +&& rm -rf /root/.composer \ +&& rm -rf /root/.config \ +&& rm -rf /root/.drush \ +&& rm -rf /root/.subversion \ +&& rm -rf /root/.v8* \ +\ +&& rm -rf /tmp/* \ +&& (rm -rf /tmp/.* || true) \ + \ + \ + \ + && (rm -rf /root/.gem || true ) \ + && (rm -rf /root/.cache || true) \ + && (rm -rf /root/.composer || true) \ + && (rm -rf /root/.config || true) \ + && (rm -rf /root/.npm || true) \ + \ + && (rm -rf /home/devilbox/.cache || true) \ + && (rm -rf /home/devilbox/.composer || true) \ + && (rm -rf /home/devilbox/.config || true) \ + && (rm -rf /home/devilbox/.npm || true) \ + \ + && (rm -rf /usr/local/src/composer/cache/* || true) \ + && rm -rf /tmp/* \ + && (rm -rf /tmp/.* || true) + + +### +### Install Composer (PHP) +### +RUN set -eux \ + \ + && rm -rf /tmp/* \ + && (rm -rf /tmp/.* || true) \ + \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + +### +### Install npm (Node) +### +RUN set -eux \ +# -------------------- angular_cli -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force @angular/cli' devilbox \ + \ +# -------------------- eslint -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force eslint' devilbox \ + \ +# -------------------- grunt -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt' devilbox \ + \ +# -------------------- grunt_cli -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force grunt-cli' devilbox \ + \ +# -------------------- gulp -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force gulp' devilbox \ + \ +# -------------------- jsonlint -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force jsonlint' devilbox \ + \ +# -------------------- pm2 -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force pm2' devilbox \ + \ +# -------------------- mdlint -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force mdlint' devilbox \ + \ +# -------------------- sass -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force sass' devilbox \ + \ +# -------------------- stylelint -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force stylelint' devilbox \ + \ +# -------------------- vue_cli -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli' devilbox \ + \ +# -------------------- vue_cli_service_global -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force @vue/cli-service-global' devilbox \ + \ +# -------------------- webpack -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack' devilbox \ + \ +# -------------------- webpack_cli -------------------- + && su -c '. /opt/nvm/nvm.sh; npm install -g --force webpack-cli' devilbox \ + \ + \ + && ln -sf $(dirname $(su -c '. /opt/nvm/nvm.sh; nvm which current' devilbox))/* /usr/local/bin/ \ + \ + && su -c '. /opt/nvm/nvm.sh; npm cache clear --force' devilbox \ + && su -c '. /opt/nvm/nvm.sh; nvm cache clear --force' devilbox \ + && rm -rf /home/devilbox/.npm \ + && rm -rf /home/devilbox/.cache \ + && rm -rf /home/devilbox/.config \ + && rm -rf /tmp/* \ + && (rm -rf /tmp/.* || true) \ + \ + && (find /opt/nvm -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + +### +### Install gem (Ruby) +### +RUN set -eux \ +# -------------------- mixlib_config -------------------- + && gem install mixlib-config -v 2.2.4 \ + \ +# -------------------- rb_inotify -------------------- + && gem install rb-inotify -v 0.9.10 \ + \ +# -------------------- mdl -------------------- + && gem install mdl -v 0.5.0 \ + \ + \ + && rm -rf /root/.gem \ + && rm -rf /tmp/* \ + && (rm -rf /tmp/.* || true) \ + \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + +### +### Install pip (Python) packages +### +RUN set -eux \ +# -------------------- ansible -------------------- + && pip install --no-cache-dir --force-reinstall ansible || true \ + \ +# -------------------- yamllint -------------------- + && pip install --no-cache-dir --force-reinstall yamllint || true \ + \ +# -------------------- yq -------------------- + && pip install --no-cache-dir --force-reinstall yq || true \ + \ + \ + && rm -rf /root/.cache/pip \ + && rm -rf /tmp/* \ + && (rm -rf /tmp/.* || true) \ + \ + && (find /usr/local/bin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/lib -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) \ + && (find /usr/local/sbin -type f -print0 | xargs -n1 -0 strip --strip-all -p 2>/dev/null || true) + + +### +### Configure Bash +### +RUN \ + { \ + echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:\${HOME}/.yarn/bin:/opt/nvm/versions/node/\$(nvm version default)/bin"; \ + echo "export PATH"; \ + echo ". /etc/bash-devilbox"; \ + echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ + echo " for f in /etc/bashrc-devilbox.d/*.sh ; do"; \ + echo " if [ -r \"\${f}\" ]; then"; \ + echo " . \"\${f}\""; \ + echo " fi"; \ + echo " done"; \ + echo " unset f"; \ + echo "fi"; \ + } | tee -a /home/${MY_USER}/${BASH_PROFILE} /root/${BASH_PROFILE} \ + && chown ${MY_USER}:${MY_GROUP} /home/${MY_USER}/${BASH_PROFILE} + + +### +### Verify +### +RUN set -eux \ + && echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.1' \ + && /usr/local/sbin/php-fpm --test \ + \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + && PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \ + \ + && PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ + && rm -f /usr/local/etc/php/php.ini + +RUN set -eux \ +# -------------------- Software -------------------- + && composer --version 2>/dev/null | grep -E 'version\s*[0-9][.0-9]+' \ + && su -c '. /opt/nvm/nvm.sh; nvm --version' devilbox | grep -E '^[0-9][.0-9]+' \ + && regex-grep --version | grep -E '[0-9][.0-9]+' \ + && dep --version 2>/dev/null | grep -Ei 'deployer\s*(version\s*)?[0-9][.0-9]+' \ + && git-flow version | grep -E '[0-9][.0-9]+' \ + && linkcheck --version | grep -E '^linkcheck\sv[0-9][.0-9]+' \ + && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[0-9][.0-9]+' \ + && mysqldump-secure --version | grep -E 'Version:\s*[0-9][.0-9]+' \ + && phpcs --version | grep -E 'version [0-9][.0-9]+' \ + && phpcbf --version | grep -E 'version [0-9][.0-9]+' \ + && phpmd --version | grep -E '^PHPMD [0-9][.0-9]+' \ + && symfony -V | grep -Ei 'version\s*.*v[0-9][.0-9]+' \ + && wkhtmltopdf --version | grep -E "^wkhtmltopdf [0-9][.0-9]+\s+\(.+patched.+\)" \ + && wp --allow-root --version | grep -E '[0-9][.0-9]+' \ + \ +# -------------------- Composer -------------------- + \ +# -------------------- PIP -------------------- + && ansible --version | grep -E '^ansible [0-9][.0-9]+$' \ + && yamllint --version 2>&1 | grep -E '[0-9][.0-9]+' \ + && yq --version 2>&1 | grep -E '^yq\s+[0-9][.0-9]+$' \ + \ +# -------------------- NPM -------------------- + && ng version 2>&1 | grep -iE 'Angular CLI:\s*[0-9][.0-9]+' \ + && eslint -v | grep -E '[0-9][.0-9]+' \ + && grunt --version | grep -E '[0-9][.0-9]+' \ + && gulp --version | grep -E '[0-9][.0-9]+' \ + && jsonlint --version | grep -E '[0-9][.0-9]+' \ + && pm2 --no-daemon --version | tail -1 | grep -E '[0-9][.0-9]+' \ + && mdlint --version | grep -E '[0-9][.0-9]+' \ + && sass --version | grep -E '[0-9][.0-9]+' \ + && stylelint --version | grep -E '[0-9][.0-9]+' \ + && vue --version | grep -E '[0-9][.0-9]+' \ + && webpack --version | grep -E '[0-9][.0-9]+' \ + \ +# -------------------- GEM -------------------- + && mdl --version | grep -E '[0-9][.0-9]+' \ + \ +# -------------------- Cleanup -------------------- + && rm -rf /home/devilbox/.cache/ \ + && rm -rf /home/devilbox/.config/ \ + && rm -rf /root/.ansible \ + && rm -rf /root/.console \ + && rm -rf /root/.composer \ + && rm -rf /root/.drush \ + && rm -rf /root/.pm2 \ + && rm -rf /tmp/* \ + && (rm -rf /tmp/.* || true) + + +### +### Copy files +### +COPY ./data/php-ini.d/php-8.1.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini +COPY ./data/php-fpm.conf/php-fpm-8.1.conf /usr/local/etc/php-fpm.conf + +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ +COPY ./data/bash-devilbox /etc/bash-devilbox +COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + + +### +### Volumes +### +VOLUME /shared/backups +VOLUME /var/log/php +VOLUME /var/mail + + +### +### Ports +### +EXPOSE 9000 + + +### +### Where to start inside the container +### +WORKDIR /shared/httpd + + +### +### Entrypoint +### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/data/php-fpm.conf/php-fpm-8.1.conf b/Dockerfiles/work/data/php-fpm.conf/php-fpm-8.1.conf new file mode 100644 index 0000000..b743989 --- /dev/null +++ b/Dockerfiles/work/data/php-fpm.conf/php-fpm-8.1.conf @@ -0,0 +1,134 @@ +; ################################################################################ +; #### +; #### The following settings can be overwritten by later includes +; #### +; ################################################################################ + + +; ############################################################ +; Timeouts +; ############################################################ + +[www] +; The timeout for serving a single request after which the worker process will be killed. +; This option should be used when the 'max_execution_time' ini option does not stop script +; execution for some reason. +request_terminate_timeout = 120s + + +; ############################################################ +; Logging +; ############################################################ + +[global] +error_log = /proc/self/fd/2 +log_level = notice + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + + +; ############################################################ +; Backlog configuration +; ############################################################ + +[www] +; A maximum of backlog incoming connections will be queued for processing. +; If a connection request arrives with the queue full the client may receive an error with an +; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission, +; the request may be ignored so that retries may succeed. + +; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections +; are silently truncated +listen.backlog = 1024 + + +; ############################################################ +; Worker configuration +; ############################################################ + +[www] +; static - the number of child processes is fixed (pm.max_children). +; +; dynamic - the number of child processes is set dynamically based on the following directives: +; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers. +; +; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where +; pm.start_servers are started when the service is started. +pm = ondemand + +; The maximum number of child processes to be created +pm.max_children = 50 + +; The number of child processes created on startup. Used only when pm is set to dynamic. +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2. +pm.start_servers = 4 + +; The desired minimum number of idle server processes. +pm.min_spare_servers = 2 + +; The desired maximum number of idle server processes. +pm.max_spare_servers = 6 + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. +; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default value: 0. +pm.max_requests = 500 + +; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand +pm.process_idle_timeout = 10s + + +; ############################################################ +; Include +; ############################################################ + + +[global] +include = /usr/local/etc/php-fpm.d/*.conf + + +; ################################################################################ +; #### +; #### The following settings overwrite any includes again +; #### +; ################################################################################ + + +; ############################################################ +; Required for Dockerization +; ############################################################ + +[global] +daemonize = no + +[www] +; Keep env variables set by docker +clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes + + +; ############################################################ +; User and Group +; ############################################################ + +[www] +user = devilbox +group = devilbox + + +; ############################################################ +; Networking +; ############################################################ + +[www] +; Ensure to listen here +listen = 9000 diff --git a/Dockerfiles/work/data/php-ini.d/php-8.1.ini b/Dockerfiles/work/data/php-ini.d/php-8.1.ini new file mode 100644 index 0000000..a7f6175 --- /dev/null +++ b/Dockerfiles/work/data/php-ini.d/php-8.1.ini @@ -0,0 +1,49 @@ +; ############################################################ +; # Devilbox PHP defaults for 8.1-work +; ############################################################ + +; Each PHP flavour (base, mods, prod, work) might have its own php.ini. +; If none is present, the one from the previous flavour is inherited. + + +[PHP] + +; Memory +; Note: "memory_limit" should be larger than "post_max_size" +memory_limit = 512M + + +; Timeouts +max_execution_time = 120 +max_input_time = 120 + + +; Uploads +; Note: "post_max_size" should be greater than "upload_max_filesize" +post_max_size = 72M +upload_max_filesize = 64M +max_file_uploads = 20 + + +; Vars +variables_order = EGPCS +max_input_vars = 8000 +max_input_nesting_level = 64 + + +; Error reporting +; Note: error_log is dynamic and handled during start to set appropriate setting +error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED +xmlrpc_errors = Off +report_memleaks = On +display_errors = On +display_startup_errors = On +log_errors = On +html_errors = On + + +; Xdebug settings +xdebug.default_enable = Off +xdebug.profiler_enable = Off +xdebug.remote_enable = Off +xdebug.remote_autostart = Off diff --git a/Makefile b/Makefile index 22a864c..629c917 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ help: @echo "--------------------------------------------------------------------------------" @echo @echo "VERSION One of '5.2', '5.3', '5.4', '5.5', '5.6', '7.0'," - @echo " '7.1', '7.2', '7.3', '7.4', '8.0'." + @echo " '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'." @echo " For gen-readme target it is optional and if not" @echo " specified, it will generate for all versions." @echo @@ -308,7 +308,9 @@ ifeq ($(VERSION),7.4) else ifeq ($(VERSION),8.0) else - @$(info VERSION can only be: '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' or '8.0') +ifeq ($(VERSION),8.1) +else + @$(info VERSION can only be: '5.2', '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' or '8.1') @$(info ) @$(error Exiting) endif @@ -321,6 +323,7 @@ endif endif endif endif +endif endif @echo "Version $(VERSION) is valid" diff --git a/README.md b/README.md index 45c22dd..4a69a25 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Have a look at the following Devilbox base images for which no official versions * [PHP-FPM 5.3](https://github.com/devilbox/docker-php-fpm-5.3) * [PHP-FPM 7.4](https://github.com/devilbox/docker-php-fpm-7.4) * [PHP-FPM 8.0](https://github.com/devilbox/docker-php-fpm-8.0) +* [PHP-FPM 8.1](https://github.com/devilbox/docker-php-fpm-8.1) #### Documentation @@ -221,7 +222,7 @@ The following table shows a more complete overview about the offered Docker imag - base + base devilbox/php-fpm:5.2-base @@ -297,9 +298,16 @@ The following table shows a more complete overview about the offered Docker imag + + devilbox/php-fpm:8.1-base + + + + + - mods + mods devilbox/php-fpm:5.2-mods @@ -376,9 +384,16 @@ The following table shows a more complete overview about the offered Docker imag + + devilbox/php-fpm:8.1-mods + + + + + - prod + prod devilbox/php-fpm:5.2-prod @@ -455,9 +470,16 @@ The following table shows a more complete overview about the offered Docker imag + + devilbox/php-fpm:8.1-prod + + + + + - work + work devilbox/php-fpm:5.2-work @@ -534,6 +556,13 @@ The following table shows a more complete overview about the offered Docker imag + + devilbox/php-fpm:8.1-work + + + + + @@ -654,6 +683,11 @@ Check out this table to see which Docker image provides what PHP modules. 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 + + 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 + @@ -674,6 +708,7 @@ docker pull devilbox/php-fpm:7.2-base docker pull devilbox/php-fpm:7.3-base docker pull devilbox/php-fpm:7.4-base docker pull devilbox/php-fpm:8.0-base +docker pull devilbox/php-fpm:8.1-base ``` Generic PHP-FPM base image. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.

(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`) @@ -691,6 +726,7 @@ docker pull devilbox/php-fpm:7.2-mods docker pull devilbox/php-fpm:7.3-mods docker pull devilbox/php-fpm:7.4-mods docker pull devilbox/php-fpm:8.0-mods +docker pull devilbox/php-fpm:8.1-mods ``` Generic PHP-FPM image with fully loaded extensions. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.

(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`) @@ -708,6 +744,7 @@ docker pull devilbox/php-fpm:7.2-prod docker pull devilbox/php-fpm:7.3-prod docker pull devilbox/php-fpm:7.4-prod docker pull devilbox/php-fpm:8.0-prod +docker pull devilbox/php-fpm:8.1-prod ``` Devilbox production image. This Docker image comes with many injectables, port-forwardings, mail-catch-all and user/group rewriting. @@ -725,6 +762,7 @@ docker pull devilbox/php-fpm:7.2-work docker pull devilbox/php-fpm:7.3-work docker pull devilbox/php-fpm:7.4-work docker pull devilbox/php-fpm:8.0-work +docker pull devilbox/php-fpm:8.1-work ``` Devilbox development image. Same as prod, but comes with lots of locally installed tools to make development inside the container as convenient as possible. See [Integrated Development Environment](#integrated-development-environment) for more information about this. diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 2a70b88..758054a 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -5,6 +5,8 @@ FROM devilbox/php-fpm-5.2 FROM devilbox/php-fpm-5.3 {% elif php_version == 8.0 %} FROM devilbox/php-fpm-8.0 +{% elif php_version == 8.1 %} +FROM devilbox/php-fpm-8.1 {% else %} FROM php:{{ php_version }}-fpm {% endif %} diff --git a/build/ansible/DOCKERFILES/Dockerfile-work.j2 b/build/ansible/DOCKERFILES/Dockerfile-work.j2 index 5725785..b3193be 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-work.j2 @@ -106,7 +106,7 @@ RUN set -eux \ mongodb-org-shell \ mongodb-org-tools \ moreutils \ -{% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0] %} +{% if php_version in [7.1, 7.2, 7.3, 7.4, 8.0, 8.1] %} mariadb-client \ {% else %} mysql-client \ diff --git a/build/ansible/group_vars/all/all-ansible.yml b/build/ansible/group_vars/all/all-ansible.yml index e1cd6c6..0c6fb87 100644 --- a/build/ansible/group_vars/all/all-ansible.yml +++ b/build/ansible/group_vars/all/all-ansible.yml @@ -33,6 +33,7 @@ php_all_versions: - 7.3 - 7.4 - 8.0 + - 8.1 # ------------------------------------------------------------------------------------------------- diff --git a/build/ansible/group_vars/all/mods.yml b/build/ansible/group_vars/all/mods.yml index b48fbab..0bb77b6 100644 --- a/build/ansible/group_vars/all/mods.yml +++ b/build/ansible/group_vars/all/mods.yml @@ -145,7 +145,7 @@ extensions_enabled: # command: [required] Custom command to install and enable a module extensions_available: amqp: - disabled: [8.0] + disabled: [8.0, 8.1] 5.2: run_dep: [librabbitmq1] type: pecl @@ -168,7 +168,7 @@ extensions_available: build_dep: [librabbitmq-dev] run_dep: [librabbitmq4] apcu: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] 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] + disabled: [5.2, 5.3, 5.4, 5.5, 8.0, 8.1] all: type: custom command: | @@ -225,7 +225,7 @@ extensions_available: all: type: builtin ffi: - already_avail: [8.0] + already_avail: [8.0, 8.1] disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3] all: type: git @@ -238,7 +238,7 @@ extensions_available: build_dep: [libffi-dev] run_dep: [libffi6] fileinfo: - already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0] + already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] 5.2: type: pecl build_dep: [libmagic-dev] @@ -247,7 +247,7 @@ extensions_available: filter: already_avail: "{{ php_all_versions }}" # Available by default ftp: - already_avail: [5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0] + already_avail: [5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] all: type: builtin configure: --with-openssl-dir @@ -306,6 +306,9 @@ extensions_available: 8.0: type: builtin configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype + 8.1: + type: builtin + configure: --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype all: type: builtin pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ @@ -326,7 +329,7 @@ extensions_available: iconv: already_avail: "{{ php_all_versions }}" igbinary: - disabled: [8.0] + disabled: [8.0, 8.1] 5.2: type: pecl version: 2.0.7 @@ -345,7 +348,7 @@ extensions_available: all: type: pecl imagick: - disabled: [5.2, 5.3, 5.4, 8.0] # Only available since 5.3. 5.3 and 5.4 segfaults + disabled: [5.2, 5.3, 5.4, 8.0, 8.1] # Only available since 5.3. 5.3 and 5.4 segfaults 5.5: type: pecl build_dep: [libmagickwand-dev, libwebp5, ghostscript] @@ -373,7 +376,7 @@ extensions_available: && sed -i'' 's|.*= 7.2 by phalcon >=4.0 module + disabled: [5.2, 5.3, 8.0, 8.1] # IMPORTANT: Required by PHP >= 7.2 by phalcon >=4.0 module 5.4: type: pecl version: 0.5.1 @@ -741,7 +768,7 @@ extensions_available: all: type: pecl phalcon: - disabled: [5.2, 8.0] # TODO: currently disabled for 7.4 as it breaks + disabled: [5.2, 8.0, 8.1] # TODO: currently disabled for 7.4 as it breaks 5.3: type: git git_url: https://github.com/phalcon/cphalcon @@ -778,7 +805,7 @@ extensions_available: git_ref: $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep -E '^v[.0-9]+$' | tail -1) command: cd build && ./install phar: - already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0] + already_avail: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] 5.2: type: pecl build_dep: [libssl-dev] @@ -792,7 +819,7 @@ extensions_available: readline: already_avail: "{{ php_all_versions }}" recode: - disabled: [7.4, 8.0] + disabled: [7.4, 8.0, 8.1] already_avail: [5.3, 5.4] all: type: builtin @@ -829,12 +856,27 @@ extensions_available: && ./configure --enable-redis \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ + 8.1: + type: git + git_url: https://github.com/phpredis/phpredis + git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) + # TODO: This is a nasty work-around to fix current phpredis implementation for PHP 8.1 + command: | + sed -i'' 's/, ZSTR_LEN(ra->algorithm)//g' redis_array_impl.c \ + && sed -i'' 's|.*sctx->cb\.no_separation.*||g' library.c \ + && sed -i'' 's|.*sctx->cb\.no_separation.*||g' redis_array_impl.c \ + && sed -i'' 's|.*sctx->cb\.no_separation.*||g' cluster_library.c \ + && sed -i'' 's|.*->no_separation.*||g' redis_array_impl.c \ + && phpize \ + && ./configure --enable-redis \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ all: type: pecl 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] + 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: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] 5.3: type: pecl version: 3.0.5 @@ -889,14 +931,14 @@ extensions_available: type: builtin build_dep: [libsodium-dev] solr: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 8.0] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 8.0, 8.1] all: type: pecl build_dep: [libxml2-dev, libcurl4-openssl-dev] spl: already_avail: "{{ php_all_versions }}" sqlsrv: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.4, 8.0] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 7.4, 8.0, 8.1] 7.0: type: pecl version: 5.3.0 @@ -912,14 +954,14 @@ extensions_available: build_dep: [unixodbc-dev] run_dep: [unixodbc] ssh2: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0, 8.1] all: type: pecl version: 1.2 build_dep: [libssh2-1-dev] run_dep: [libssh2-1] swoole: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] 5.3: type: pecl version: 1.9.23 @@ -978,7 +1020,7 @@ extensions_available: tokenizer: already_avail: "{{ php_all_versions }}" uploadprogress: - disabled: [8.0] + disabled: [8.0, 8.1] 5.2: type: pecl 5.3: @@ -994,7 +1036,7 @@ extensions_available: git_url: https://github.com/php/pecl-php-uploadprogress configure: --enable-uploadprogress vips: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0, 8.1] 7.0: build_dep: - fftw-dev @@ -1086,7 +1128,7 @@ extensions_available: - libwebpmux3 wddx: # https://wiki.php.net/rfc/deprecate-and-remove-ext-wddx - disabled: [7.4, 8.0] + disabled: [7.4, 8.0, 8.1] all: type: builtin configure: --with-libxml-dir=/usr @@ -1115,10 +1157,14 @@ extensions_available: type: git git_url: https://github.com/xdebug/xdebug configure: --enable-xdebug + 8.1: + type: git + git_url: https://github.com/xdebug/xdebug + configure: --enable-xdebug all: type: pecl xlswriter: - disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6, 8.0, 8.1] all: type: pecl build_dep: [zlib1g-dev] @@ -1128,7 +1174,7 @@ extensions_available: xmlreader: already_avail: "{{ php_all_versions }}" xmlrpc: - disabled: [8.0] + disabled: [8.0, 8.1] 7.4: type: builtin configure: --with-iconv-dir=/usr @@ -1144,7 +1190,7 @@ extensions_available: build_dep: [libxslt-dev] run_dep: [libxslt1.1] yaml: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] 5.3: type: pecl version: 1.3.2 diff --git a/build/ansible/group_vars/all/work.yml b/build/ansible/group_vars/all/work.yml index e67d61a..33e825c 100644 --- a/build/ansible/group_vars/all/work.yml +++ b/build/ansible/group_vars/all/work.yml @@ -154,6 +154,8 @@ apt_repositories_available: deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main 8.0: deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main + 8.1: + deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main all: deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main key: A1715D88E1DF1F24 @@ -208,31 +210,31 @@ apt_repositories_available: # composer_available: asgardcms: - disabled: [5.2, 5.3, 5.4, 8.0] + disabled: [5.2, 5.3, 5.4, 8.0, 8.1] check: asgardcms --version 2>/dev/null | grep -Ei 'AsgardCMS\sInstaller\s[0-9][.0-9]+' name: asgardcms/asgardcms-installer link: asgardcms version: 2 codeception: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[0-9][.0-9]+$' name: codeception/codeception link: codecept version: 2 lumen: - disabled: [5.2, 5.3, 5.4, 8.0] + disabled: [5.2, 5.3, 5.4, 8.0, 8.1] check: lumen --version 2>/dev/null | grep -E '^Lumen Installer\s[0-9][.0-9]+$' name: laravel/lumen-installer link: lumen version: 2 photon: - disabled: [5.2, 5.3, 5.4, 8.0] + disabled: [5.2, 5.3, 5.4, 8.0, 8.1] check: photon --version | grep -E 'Installer [0-9][.0-9]+' name: photoncms/installer link: photon version: 2 prestissimo: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] name: hirak/prestissimo version: 1 @@ -259,7 +261,7 @@ gem_available: # version which is not supported by the ruby version (>= 2.3) ffi: name: ffi - disabled: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0] + disabled: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1] all: version: 1.12.2 rb_inotify: @@ -269,6 +271,8 @@ gem_available: mdl: name: mdl check: mdl --version | grep -E '[0-9][.0-9]+' + 8.1: + version: 0.5.0 8.0: version: 0.5.0 7.4: @@ -458,7 +462,7 @@ software_available: command: curl -sS -L --fail https://deployer.org/deployer.phar -L -o /usr/local/bin/dep post: chmod +x /usr/local/bin/dep drush7: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] check: drush7 --version | grep -E '7[.0-9]+\s*$' all: pre: | @@ -474,7 +478,7 @@ software_available: && rm -rf /usr/local/src/drush7/examples \ && rm -rf /usr/local/src/drush7/misc \ drush8: - disabled: [5.2, 5.3, 8.0] + disabled: [5.2, 5.3, 8.0, 8.1] check: drush8 --version | grep -E '8[.0-9]+\s*$' all: pre: | @@ -490,7 +494,7 @@ software_available: && rm -rf /usr/local/src/drush8/examples \ && rm -rf /usr/local/src/drush8/misc \ drush9: - disabled: [5.2, 5.3, 5.4, 5.5, 8.0] + disabled: [5.2, 5.3, 5.4, 5.5, 8.0, 8.1] check: drush9 --version | grep -E '9[.0-9]+\s*$' all: pre: | @@ -506,7 +510,7 @@ software_available: && rm -rf /usr/local/src/drush9/examples \ && rm -rf /usr/local/src/drush9/misc \ drupalconsole: - disabled: [5.2, 5.3, 5.4, 8.0] # TODO: re-enable for 8.0 (currently errors) + disabled: [5.2, 5.3, 5.4, 8.0, 8.1] # TODO: re-enable for 8.0 (currently errors) check: drupal --version | grep -E 'Drupal Console Launcher\s*[0-9][.0-9]' all: pre: DURL="https://github.com$(curl -sS 'https://github.com/hechoendrupal/drupal-console-launcher/releases' | grep -Eo 'href="/.+drupal.phar"' | head -1 | sed 's/^href="//g' | sed 's/"$//g')" @@ -522,7 +526,7 @@ software_available: && cd / && rm -rf /tmp/gitflow \ laravel: check: laravel --version | grep -E '(Installer|version)\s*[0-9][.0-9]+' - disabled: [5.2, 5.3, 8.0] + disabled: [5.2, 5.3, 8.0, 8.1] 5.4: pre: | git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ @@ -626,7 +630,7 @@ software_available: && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ phalcon: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] check: phalcon commands | grep -E '[0-9][.0-9]+' 5.3: pre: | @@ -740,7 +744,7 @@ software_available: curl -sS -L --fail https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ php-cs-fixer: - disabled: [5.2, 7.4, 8.0] + disabled: [5.2, 7.4, 8.0, 8.1] check: php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' 5.3: command: | @@ -767,7 +771,7 @@ software_available: && mv phpmd.phar /usr/local/bin/phpmd \ && chmod +x /usr/local/bin/phpmd \ phpunit: - disabled: [5.2, 8.0] + disabled: [5.2, 8.0, 8.1] check: phpunit --version | grep -iE '^PHPUnit\s[0-9][.0-9]+' 5.3: command: | @@ -850,6 +854,14 @@ software_available: && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ + 8.1: + command: | + DEBIAN_FRONTEND=noninteractive apt-get update -qq \ + && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y --no-install-recommends --no-install-suggests \ + libfontenc1 libxfont2 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils \ + && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb https://github.com/${VERSION} \ + && dpkg -i /tmp/wkhtmltopdf.deb \ + && rm -f /tmp/wkhtmltopdf.deb \ all: pre: VERSION="$( curl -sSL -L --fail https://github.com/wkhtmltopdf/wkhtmltopdf/releases | grep -Eo '/wkhtmltopdf/.+stretch_amd64\.deb' | head -1 )" command: | diff --git a/build/ansible/inventory b/build/ansible/inventory index 22568fa..b3ad8e5 100644 --- a/build/ansible/inventory +++ b/build/ansible/inventory @@ -10,3 +10,4 @@ php-7.2 php_version=7.2 ansible_connection=local php-7.3 php_version=7.3 ansible_connection=local php-7.4 php_version=7.4 ansible_connection=local php-8.0 php_version=8.0 ansible_connection=local +php-8.1 php_version=8.1 ansible_connection=local diff --git a/build/gen-readme.sh b/build/gen-readme.sh index 49d1a8a..885dca9 100755 --- a/build/gen-readme.sh +++ b/build/gen-readme.sh @@ -25,6 +25,7 @@ print_usage() { echo " gen-readme.sh 7.3" echo " gen-readme.sh 7.4" echo " gen-readme.sh 8.0" + echo " gen-readme.sh 8.1" } @@ -94,6 +95,7 @@ if [ "${#}" -eq "0" ]; then update_readme "7.3" update_readme "7.4" update_readme "8.0" + update_readme "8.1" elif [ "${#}" -gt "1" ]; then # Specifying more than 1 argument is wrong echo "Error, invalid number of arguments." @@ -110,7 +112,8 @@ else && [ "${1}" != "7.2" ] \ && [ "${1}" != "7.3" ] \ && [ "${1}" != "7.4" ] \ - && [ "${1}" != "8.0" ]; then + && [ "${1}" != "8.0" ] \ + && [ "${1}" != "8.1" ]; then # Argument does not match any of the PHP versions echo "Error, invalid argument." print_usage