diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 2d9484a..756d556 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -4,7 +4,7 @@ ### Lints all generic and json files in the whole git repository ### -name: linting +name: Linting on: pull_request: diff --git a/.github/workflows/images.yml b/.github/workflows/php-ci.yml similarity index 99% rename from .github/workflows/images.yml rename to .github/workflows/php-ci.yml index 1ca19ff..026b602 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/php-ci.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: PHP +name: PHP-CI # ------------------------------------------------------------------------------------------------- @@ -20,10 +20,6 @@ on: tags: - '[0-9]+.[0-9]+*' - # Runs daily - schedule: - - cron: '0 0 * * *' - # ------------------------------------------------------------------------------------------------- # What to run diff --git a/.github/workflows/php-nightly.yml b/.github/workflows/php-nightly.yml new file mode 100644 index 0000000..b30ec80 --- /dev/null +++ b/.github/workflows/php-nightly.yml @@ -0,0 +1,328 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: PHP-Nightly + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs daily + schedule: + - cron: '0 0 * * *' + + + +# ------------------------------------------------------------------------------------------------- +# What to run +# ------------------------------------------------------------------------------------------------- +jobs: + diagnostics: + name: Diagnostics + runs-on: ubuntu-latest + strategy: + fail-fast: False + steps: + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Show environment + run: | + env + + # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#github-context + - name: Show GitHub variables + run: | + echo "github.actor: ${{ github.actor }}" + echo "github.ref: ${{ github.ref }}" + echo "github.base_ref: ${{ github.base_ref }}" + echo "github.head_ref: ${{ github.head_ref }}" + echo "github.event: ${{ github.event }}" + echo "github.event_name: ${{ github.event_name }}" + echo "github.event.pull_request.base.repo.id: ${{ github.event.pull_request.base.repo.id }}" + echo "github.event.pull_request.head.repo.id: ${{ github.event.pull_request.head.repo.id }}" + + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "${GITHUB_CONTEXT}" + + - name: Dump Runner context + env: + RUNNER_CONTEXT: ${{ toJson(runner) }} + run: echo "${RUNNER_CONTEXT}" + + + build: + name: "[ ${{ matrix.version }} ]" + runs-on: ubuntu-latest + strategy: + fail-fast: False + matrix: + # Adding all targets and only run them if they exist. + # Prevents us from forgetting to update this in case + # we add new envs in terragrunt. + version: + - '5.2' + - '5.3' + - '5.4' + - '5.5' + - '5.6' + - '7.0' + - '7.1' + - '7.2' + - '7.3' + - '7.4' + - '8.0' + steps: + + # ------------------------------------------------------------ + # Checkout repository + # ------------------------------------------------------------ + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Set variables + id: vars + run: | + # Set git branch or git tag as slug + if [[ ${GITHUB_REF} =~ ^refs\/tags\/ ]]; then + GIT_TYPE=TAG + GIT_SLUG="${GITHUB_REF/refs\/tags\//}" + else + GIT_TYPE=BRANCH + if [ -n "${GITHUB_HEAD_REF}" ]; then + GIT_SLUG="${GITHUB_HEAD_REF}" + else + GIT_SLUG="${GITHUB_REF/refs\/heads\//}" + fi + fi + + # Export variable + # # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-environment-variable-set-env + echo ::set-env name=GIT_TYPE::${GIT_TYPE} + echo ::set-env name=GIT_SLUG::${GIT_SLUG} + + + # ------------------------------------------------------------ + # Base + # ------------------------------------------------------------ + - name: Build Base + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + retry make build-base VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + + - name: Test Base + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + retry make test-base VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + + + # ------------------------------------------------------------ + # Mods + # ------------------------------------------------------------ + - name: Build Mods + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + retry make build-mods VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + + - name: Test Mods + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + retry make test-mods VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + + + # ------------------------------------------------------------ + # Prod + # ------------------------------------------------------------ + - name: Build Prod + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + retry make build-prod VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + + - name: Test Prod + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + retry make test-prod VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + + + # ------------------------------------------------------------ + # Work + # ------------------------------------------------------------ + - name: Build Work + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + retry make build-work VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + + - name: Test Work + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + retry make test-work VERSION=${VERSION} + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + + + # ------------------------------------------------------------ + # Diff README.md + # ------------------------------------------------------------ + - name: Diff README.md + run: | + make gen-readme VERSION=${VERSION} + git diff --quiet || { echo "Build Changes"; git diff; git status; false; } + env: + VERSION: ${{ matrix.version }} + + + # ------------------------------------------------------------ + # Push build artifacts + # ------------------------------------------------------------ + + # Only run this, if the PR was created by the repo owner + - name: Publish images (only repo owner) + run: | + retry() { + for ((n=0; n<${RETRIES}; n++)); do + echo "[${n}] ${*}"; + if eval "${*}"; then + return 0; + fi; + sleep 10; + done; + return 1; + } + + # Info output + echo "Git Type: ${GIT_TYPE}" + echo "Git Slug: ${GIT_SLUG}" + + # Login + echo "retry make login USER= PASS=" + + # Push + if [ "${GIT_TYPE}" = "TAG" ]; then + echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}" + echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}" + echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}" + echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}" + else + if [ "${GIT_SLUG}" = "master" ]; then + echo "retry make push-base VERSION=${VERSION}" + echo "retry make push-mods VERSION=${VERSION}" + echo "retry make push-prod VERSION=${VERSION}" + echo "retry make push-work VERSION=${VERSION}" + else + echo "retry make push-base VERSION=${VERSION}-${GIT_SLUG}" + echo "retry make push-mods VERSION=${VERSION}-${GIT_SLUG}" + echo "retry make push-prod VERSION=${VERSION}-${GIT_SLUG}" + echo "retry make push-work VERSION=${VERSION}-${GIT_SLUG}" + fi + fi + env: + VERSION: ${{ matrix.version }} + RETRIES: 5 + # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions + if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id + && ( + (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + || + (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + || + (github.event_name == 'pull_request' && (startsWith(github.head_ref, 'release-'))) + ) diff --git a/Dockerfiles/base/Dockerfile-5.2 b/Dockerfiles/base/Dockerfile-5.2 index 6a98e1e..612d43e 100644 --- a/Dockerfiles/base/Dockerfile-5.2 +++ b/Dockerfiles/base/Dockerfile-5.2 @@ -107,4 +107,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 index 4879379..67d9a8b 100644 --- a/Dockerfiles/base/Dockerfile-5.3 +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -107,4 +107,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-5.4 b/Dockerfiles/base/Dockerfile-5.4 index ba31901..f4854bb 100644 --- a/Dockerfiles/base/Dockerfile-5.4 +++ b/Dockerfiles/base/Dockerfile-5.4 @@ -107,4 +107,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-5.5 b/Dockerfiles/base/Dockerfile-5.5 index e27214d..dea549f 100644 --- a/Dockerfiles/base/Dockerfile-5.5 +++ b/Dockerfiles/base/Dockerfile-5.5 @@ -107,4 +107,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-5.6 b/Dockerfiles/base/Dockerfile-5.6 index 1ce652d..bce31eb 100644 --- a/Dockerfiles/base/Dockerfile-5.6 +++ b/Dockerfiles/base/Dockerfile-5.6 @@ -100,4 +100,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-7.0 b/Dockerfiles/base/Dockerfile-7.0 index 3428159..c9e38a5 100644 --- a/Dockerfiles/base/Dockerfile-7.0 +++ b/Dockerfiles/base/Dockerfile-7.0 @@ -100,4 +100,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-7.1 b/Dockerfiles/base/Dockerfile-7.1 index 8bb3a79..76f40d2 100644 --- a/Dockerfiles/base/Dockerfile-7.1 +++ b/Dockerfiles/base/Dockerfile-7.1 @@ -100,4 +100,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-7.2 b/Dockerfiles/base/Dockerfile-7.2 index abe8209..ed031f4 100644 --- a/Dockerfiles/base/Dockerfile-7.2 +++ b/Dockerfiles/base/Dockerfile-7.2 @@ -100,4 +100,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 index df549d3..0476f8b 100644 --- a/Dockerfiles/base/Dockerfile-7.3 +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -100,4 +100,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-7.4 b/Dockerfiles/base/Dockerfile-7.4 index bd82377..af85e85 100644 --- a/Dockerfiles/base/Dockerfile-7.4 +++ b/Dockerfiles/base/Dockerfile-7.4 @@ -100,4 +100,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/Dockerfile-8.0 b/Dockerfiles/base/Dockerfile-8.0 index 21256be..bed7491 100644 --- a/Dockerfiles/base/Dockerfile-8.0 +++ b/Dockerfiles/base/Dockerfile-8.0 @@ -100,4 +100,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/data/docker-entrypoint.sh b/Dockerfiles/base/data/docker-entrypoint.sh index 85de2fd..90d06ac 100755 --- a/Dockerfiles/base/data/docker-entrypoint.sh +++ b/Dockerfiles/base/data/docker-entrypoint.sh @@ -2,7 +2,7 @@ set -e set -u -set -p pipefail +set -o pipefail ### @@ -52,4 +52,4 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}" ### Startup ### log "info" "Starting $( php-fpm -v 2>&1 | head -1 )" "${DEBUG_LEVEL}" -exec /usr/local/sbin/php-fpm +exec "${@}" diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 index c9d6669..a641774 100644 --- a/Dockerfiles/mods/Dockerfile-5.2 +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -773,4 +773,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index c746398..87b7a0c 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -448,7 +448,7 @@ RUN set -eux \ # Custom: Branch && git checkout phalcon-v2.0.9 \ # Custom: Install command - && cd build && ./install >/dev/null \ + && cd build && ./install \ # Enabling && docker-php-ext-enable phalcon \ && true @@ -916,4 +916,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index 95b418c..91acca0 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -924,4 +924,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index 1d95a64..b81714b 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -912,4 +912,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index 522e731..9f4d584 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -930,4 +930,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index fe16065..72279a7 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -973,4 +973,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index 842c11b..2803c89 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -971,4 +971,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index fbfb088..3eebfde 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -977,4 +977,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index 703e17f..4d37491 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -36,6 +36,7 @@ RUN set -eux \ libpng-dev \ libpq-dev \ libpspell-dev \ + librabbitmq-dev \ librdkafka-dev \ librecode-dev \ libsasl2-dev \ @@ -69,6 +70,17 @@ RUN set -eux \ echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ fi +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && echo "/usr" | pecl install amqp \ + # Enabling + && docker-php-ext-enable amqp \ + && true + + # -------------------- Installing PHP Extension: apcu -------------------- RUN set -eux \ # Installation: Generic @@ -427,6 +439,21 @@ RUN set -eux \ && 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 @@ -704,6 +731,7 @@ RUN set -eux \ libnghttp2-14 \ libpng16-16 \ libpq5 \ + librabbitmq4 \ librdkafka1 \ librecode0 \ libsybdb5 \ @@ -753,6 +781,8 @@ RUN set -eux \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && rm -f /usr/local/etc/php/php.ini \ \ + && php -m | grep -oiE '^amqp$' \ + && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^apcu$' \ && php-fpm -m | grep -oiE '^apcu$' \ && php -m | grep -oiE '^bcmath$' \ @@ -849,6 +879,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^pdo_sqlsrv$' \ && php -m | grep -oiE '^pgsql$' \ && php-fpm -m | grep -oiE '^pgsql$' \ + && php -m | grep -oiE '^phalcon$' \ + && php-fpm -m | grep -oiE '^phalcon$' \ && php -m | grep -oiE '^phar$' \ && php-fpm -m | grep -oiE '^phar$' \ && php -m | grep -oiE '^posix$' \ @@ -924,4 +956,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index e0ada70..1975990 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -25,11 +25,14 @@ RUN set -eux \ libicu-dev \ libjpeg-dev \ libldap2-dev \ + libmagickwand-dev \ + libmcrypt-dev \ libmemcached-dev \ libnghttp2-dev \ libpng-dev \ libpq-dev \ libpspell-dev \ + librabbitmq-dev \ librdkafka-dev \ libsasl2-dev \ libsnmp-dev \ @@ -61,6 +64,17 @@ RUN set -eux \ echo "ffi.enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-ffi.ini; \ fi +# -------------------- Installing PHP Extension: amqp -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Custom: Pecl command + && echo "/usr" | pecl install amqp \ + # Enabling + && docker-php-ext-enable amqp \ + && true + + # -------------------- Installing PHP Extension: bcmath -------------------- RUN set -eux \ # Installation: Generic @@ -160,6 +174,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: imagick -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install imagick \ + # Enabling + && docker-php-ext-enable imagick \ + && true + + # -------------------- Installing PHP Extension: intl -------------------- RUN set -eux \ # Installation: Version specific @@ -181,6 +206,28 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: mcrypt -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install mcrypt \ + # Enabling + && docker-php-ext-enable mcrypt \ + && true + + +# -------------------- Installing PHP Extension: msgpack -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install msgpack \ + # Enabling + && docker-php-ext-enable msgpack \ + && true + + # -------------------- Installing PHP Extension: memcached -------------------- RUN set -eux \ # Installation: Version specific @@ -481,6 +528,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xdebug -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xdebug \ + # Enabling + && docker-php-ext-enable xdebug \ + && true + + # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -573,10 +631,13 @@ RUN set -eux \ libhiredis0.13 \ libicu57 \ libjpeg62-turbo \ + libmagickwand-6.q16-3 \ + libmcrypt4 \ libmemcachedutil2 \ libnghttp2-14 \ libpng16-16 \ libpq5 \ + librabbitmq4 \ librdkafka1 \ libsybdb5 \ libtidy5 \ @@ -624,6 +685,8 @@ RUN set -eux \ && if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \ && rm -f /usr/local/etc/php/php.ini \ \ + && php -m | grep -oiE '^amqp$' \ + && php-fpm -m | grep -oiE '^amqp$' \ && php -m | grep -oiE '^bcmath$' \ && php-fpm -m | grep -oiE '^bcmath$' \ && php -m | grep -oiE '^bz2$' \ @@ -660,6 +723,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^iconv$' \ && php -m | grep -oiE '^igbinary$' \ && php-fpm -m | grep -oiE '^igbinary$' \ + && php -m | grep -oiE '^imagick$' \ + && php-fpm -m | grep -oiE '^imagick$' \ && php -m | grep -oiE '^intl$' \ && php-fpm -m | grep -oiE '^intl$' \ && php -m | grep -oiE '^json$' \ @@ -670,6 +735,10 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^libxml$' \ && php -m | grep -oiE '^mbstring$' \ && php-fpm -m | grep -oiE '^mbstring$' \ + && php -m | grep -oiE '^mcrypt$' \ + && php-fpm -m | grep -oiE '^mcrypt$' \ + && php -m | grep -oiE '^msgpack$' \ + && php-fpm -m | grep -oiE '^msgpack$' \ && php -m | grep -oiE '^memcached$' \ && php-fpm -m | grep -oiE '^memcached$' \ && php -m | grep -oiE '^mongodb$' \ @@ -747,6 +816,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^tokenizer$' \ && php -m | grep -oiE '^uploadprogress$' \ && php-fpm -m | grep -oiE '^uploadprogress$' \ + && 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$' \ @@ -771,4 +842,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index cc64da9..930f9dc 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -755,4 +755,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/local/sbin/php-fpm"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-5.2 b/Dockerfiles/prod/Dockerfile-5.2 index ff231bb..51ead67 100644 --- a/Dockerfiles/prod/Dockerfile-5.2 +++ b/Dockerfiles/prod/Dockerfile-5.2 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-5.3 b/Dockerfiles/prod/Dockerfile-5.3 index 0774b65..aca7e4f 100644 --- a/Dockerfiles/prod/Dockerfile-5.3 +++ b/Dockerfiles/prod/Dockerfile-5.3 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-5.4 b/Dockerfiles/prod/Dockerfile-5.4 index 3c8b5ef..dc63848 100644 --- a/Dockerfiles/prod/Dockerfile-5.4 +++ b/Dockerfiles/prod/Dockerfile-5.4 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-5.5 b/Dockerfiles/prod/Dockerfile-5.5 index 14e56a5..f6e013c 100644 --- a/Dockerfiles/prod/Dockerfile-5.5 +++ b/Dockerfiles/prod/Dockerfile-5.5 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-5.6 b/Dockerfiles/prod/Dockerfile-5.6 index e2e0e61..c751edd 100644 --- a/Dockerfiles/prod/Dockerfile-5.6 +++ b/Dockerfiles/prod/Dockerfile-5.6 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-7.0 b/Dockerfiles/prod/Dockerfile-7.0 index 7f48df2..0dbe78e 100644 --- a/Dockerfiles/prod/Dockerfile-7.0 +++ b/Dockerfiles/prod/Dockerfile-7.0 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-7.1 b/Dockerfiles/prod/Dockerfile-7.1 index b9ec3d5..d741b73 100644 --- a/Dockerfiles/prod/Dockerfile-7.1 +++ b/Dockerfiles/prod/Dockerfile-7.1 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-7.2 b/Dockerfiles/prod/Dockerfile-7.2 index 80aad21..0b1f86c 100644 --- a/Dockerfiles/prod/Dockerfile-7.2 +++ b/Dockerfiles/prod/Dockerfile-7.2 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-7.3 b/Dockerfiles/prod/Dockerfile-7.3 index edd03d8..571a2f2 100644 --- a/Dockerfiles/prod/Dockerfile-7.3 +++ b/Dockerfiles/prod/Dockerfile-7.3 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-7.4 b/Dockerfiles/prod/Dockerfile-7.4 index ee8e04f..1df70dd 100644 --- a/Dockerfiles/prod/Dockerfile-7.4 +++ b/Dockerfiles/prod/Dockerfile-7.4 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/Dockerfile-8.0 b/Dockerfiles/prod/Dockerfile-8.0 index ebd4745..dda5c04 100644 --- a/Dockerfiles/prod/Dockerfile-8.0 +++ b/Dockerfiles/prod/Dockerfile-8.0 @@ -93,4 +93,5 @@ EXPOSE 9000 ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/data/docker-entrypoint.sh b/Dockerfiles/prod/data/docker-entrypoint.sh index 11d964e..b539011 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.sh @@ -2,7 +2,7 @@ set -e set -u -set -p pipefail +set -o pipefail ### @@ -190,4 +190,4 @@ execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}" ### Startup ### log "info" "Starting supervisord" "${DEBUG_LEVEL}" -exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec "${@}" diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 49d6473..2530ee3 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -516,4 +516,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index ec41c53..53c17fb 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -573,4 +573,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 4e87843..7396a7b 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -610,4 +610,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 37deb03..68567e5 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -631,4 +631,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 5d83f7e..e37187f 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -645,4 +645,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 918e8ed..7076e11 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -645,4 +645,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 7265524..d16da52 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -645,4 +645,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 23ab5ba..f4157a1 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -645,4 +645,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index ea1c105..62c3ee2 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -631,4 +631,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index f43179e..ccf10ac 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -625,4 +625,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index 9ab5c24..6ee29d3 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -534,4 +534,5 @@ WORKDIR /shared/httpd ### ### Entrypoint ### +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/data/docker-entrypoint.sh b/Dockerfiles/work/data/docker-entrypoint.sh index c7712f2..75f38b1 100755 --- a/Dockerfiles/work/data/docker-entrypoint.sh +++ b/Dockerfiles/work/data/docker-entrypoint.sh @@ -2,7 +2,7 @@ set -e set -u -set -p pipefail +set -o pipefail ### @@ -217,4 +217,4 @@ execute_custom_scripts "/startup.2.d" "${DEBUG_LEVEL}" ### Startup ### log "info" "Starting supervisord" "${DEBUG_LEVEL}" -exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf +exec "${@}" diff --git a/README.md b/README.md index b287375..55933d4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # PHP-FPM Docker images -[](https://github.com/devilbox/docker-php-fpm/actions?workflow=linting) -[](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP) -[](https://travis-ci.org/devilbox/docker-php-fpm) +[](https://github.com/devilbox/docker-php-fpm/actions?workflow=Linting) +[](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-CI) +[](https://github.com/devilbox/docker-php-fpm/actions?workflow=PHP-Nightly) +[](https://travis-ci.org/devilbox/docker-php-fpm) [](https://github.com/devilbox/docker-php-fpm/releases) [](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://devilbox.discourse.group) @@ -641,12 +642,12 @@ Check out this table to see which Docker image provides what PHP modules.