diff --git a/.github/workflows/v8.4.yml b/.github/workflows/v8.4.yml new file mode 100644 index 0000000..5932b71 --- /dev/null +++ b/.github/workflows/v8.4.yml @@ -0,0 +1,159 @@ +--- +name: v8.4 + +"on": + push: + branches: + - master + paths: + - v8.4/* + - .github/workflows/v8.4.yml + pull_request: + branches: + - master + paths: + - v8.4/* + - .github/workflows/v8.4.yml + workflow_dispatch: + +jobs: + docker: + runs-on: ubuntu-latest + + steps: + - name: Checkout source + id: source + uses: actions/checkout@v4 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + images: | + webhippie/php-cli + quay.io/webhippie/php-cli + ghcr.io/dockhippie/php-cli + labels: | + org.opencontainers.image.vendor=Webhippie + maintainer=Thomas Boerger + + - name: Setup QEMU + id: qemu + uses: docker/setup-qemu-action@v3 + + - name: Setup Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Hub login + id: login1 + uses: docker/login-action@v3 + if: github.event_name != 'pull_request' + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Quay login + id: login2 + uses: docker/login-action@v3 + if: github.event_name != 'pull_request' + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + + - name: Ghcr login + id: login3 + uses: docker/login-action@v3 + if: github.event_name != 'pull_request' + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build amd64 + id: amd64 + uses: docker/build-push-action@v6 + with: + builder: ${{ steps.buildx.outputs.name }} + context: v8.4/ + provenance: false + file: v8.4/Dockerfile.amd64 + platforms: linux/amd64 + push: ${{ github.event_name != 'pull_request' }} + labels: ${{ steps.meta.outputs.labels }} + tags: | + webhippie/php-cli:8.4-amd64 + quay.io/webhippie/php-cli:8.4-amd64 + ghcr.io/dockhippie/php-cli:8.4-amd64 + + - name: Build arm64 + id: arm64 + uses: docker/build-push-action@v6 + with: + builder: ${{ steps.buildx.outputs.name }} + context: v8.4/ + provenance: false + file: v8.4/Dockerfile.arm64 + platforms: linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + labels: ${{ steps.meta.outputs.labels }} + tags: | + webhippie/php-cli:8.4-arm64 + quay.io/webhippie/php-cli:8.4-arm64 + ghcr.io/dockhippie/php-cli:8.4-arm64 + + - name: Build arm + id: arm + uses: docker/build-push-action@v6 + with: + builder: ${{ steps.buildx.outputs.name }} + context: v8.4/ + provenance: false + file: v8.4/Dockerfile.arm + platforms: linux/arm/v6 + push: ${{ github.event_name != 'pull_request' }} + labels: ${{ steps.meta.outputs.labels }} + tags: | + webhippie/php-cli:8.4-arm + quay.io/webhippie/php-cli:8.4-arm + ghcr.io/dockhippie/php-cli:8.4-arm + + - name: Hub manifest + id: manifest1 + uses: actionhippie/manifest@v1 + if: github.event_name != 'pull_request' + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + platforms: linux/amd64,linux/arm64,linux/arm/v6 + template: webhippie/php-cli:8.4-ARCH + target: webhippie/php-cli:8.4 + ignore_missing: true + + - name: Quay manifest + id: manifest2 + uses: actionhippie/manifest@v1 + if: github.event_name != 'pull_request' + with: + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + platforms: linux/amd64,linux/arm64,linux/arm/v6 + template: quay.io/webhippie/php-cli:8.4-ARCH + target: quay.io/webhippie/php-cli:8.4 + ignore_missing: true + + - name: Ghcr manifest + id: manifest3 + uses: actionhippie/manifest@v1 + if: github.event_name != 'pull_request' + with: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + platforms: linux/amd64,linux/arm64,linux/arm/v6 + template: ghcr.io/dockhippie/php-cli:8.4-ARCH + target: ghcr.io/dockhippie/php-cli:8.4 + ignore_missing: true + +... diff --git a/latest/Dockerfile.amd64 b/latest/Dockerfile.amd64 index 913a138..3a68c5c 100644 --- a/latest/Dockerfile.amd64 +++ b/latest/Dockerfile.amd64 @@ -3,7 +3,7 @@ FROM ghcr.io/dockhippie/alpine:latest-amd64@sha256:d272886ae1ebdd406578fd5bb3b05 WORKDIR /srv/www CMD ["/usr/bin/container"] -ENV PHP_PACKAGE_VERSION=83 +ENV PHP_PACKAGE_VERSION=84 RUN apk update && \ apk upgrade && \ diff --git a/latest/Dockerfile.arm b/latest/Dockerfile.arm index 17da8a1..f52f98f 100644 --- a/latest/Dockerfile.arm +++ b/latest/Dockerfile.arm @@ -3,7 +3,7 @@ FROM ghcr.io/dockhippie/alpine:latest-arm@sha256:de9ee232aec6a8ed575b66cb77b02e4 WORKDIR /srv/www CMD ["/usr/bin/container"] -ENV PHP_PACKAGE_VERSION=83 +ENV PHP_PACKAGE_VERSION=84 RUN apk update && \ apk upgrade && \ diff --git a/latest/Dockerfile.arm64 b/latest/Dockerfile.arm64 index 9dcf073..981e185 100644 --- a/latest/Dockerfile.arm64 +++ b/latest/Dockerfile.arm64 @@ -3,7 +3,7 @@ FROM ghcr.io/dockhippie/alpine:latest-arm64@sha256:f8160544a697b291e7399c6563046 WORKDIR /srv/www CMD ["/usr/bin/container"] -ENV PHP_PACKAGE_VERSION=83 +ENV PHP_PACKAGE_VERSION=84 RUN apk update && \ apk upgrade && \ diff --git a/latest/overlay/etc/container.d/05-config.sh b/latest/overlay/etc/container.d/05-config.sh index 7b337cd..b115d14 100755 --- a/latest/overlay/etc/container.d/05-config.sh +++ b/latest/overlay/etc/container.d/05-config.sh @@ -3,7 +3,7 @@ if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then echo "> writing fpm config" gomplate -V \ - -o /etc/php83/php-fpm.conf \ + -o /etc/php84/php-fpm.conf \ -f /etc/templates/php-fpm.conf.tmpl if [[ $? -ne 0 ]]; then diff --git a/latest/overlay/etc/entrypoint.d/10-config.sh b/latest/overlay/etc/entrypoint.d/10-config.sh index 7c3a7d0..e9618d4 100755 --- a/latest/overlay/etc/entrypoint.d/10-config.sh +++ b/latest/overlay/etc/entrypoint.d/10-config.sh @@ -2,7 +2,7 @@ if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then gomplate \ - -o /etc/php83/php.ini \ + -o /etc/php84/php.ini \ -f /etc/templates/php.ini.tmpl || exit 1 if [[ $? -ne 0 ]]; then @@ -11,20 +11,20 @@ if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then fi fi -for TEMPLATE in $(find /etc/php83/custom.d -mindepth 1 -type d); do +for TEMPLATE in $(find /etc/php84/custom.d -mindepth 1 -type d); do RELATIVENAME=${TEMPLATE//\/etc\/php8\/custom.d\//} - if [ ! -d "/etc/php83/conf.d/${RELATIVENAME}" ]; then - mkdir "/etc/php83/conf.d/${RELATIVENAME}" + if [ ! -d "/etc/php84/conf.d/${RELATIVENAME}" ]; then + mkdir "/etc/php84/conf.d/${RELATIVENAME}" fi done -for TEMAPLTE in $(find /etc/php83/custom.d -mindepth 1 -type f); do +for TEMAPLTE in $(find /etc/php84/custom.d -mindepth 1 -type f); do RELATIVENAME=${TEMPLATE//\/etc\/php8\/custom.d\//} ln -sf \ - "/etc/php83/conf.d/${RELATIVENAME}" \ - "/etc/php83/custom.d/${RELATIVENAME}" + "/etc/php84/conf.d/${RELATIVENAME}" \ + "/etc/php84/custom.d/${RELATIVENAME}" done true diff --git a/latest/overlay/etc/php83/conf.d/00_apcu.ini b/latest/overlay/etc/php84/conf.d/00_apcu.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_apcu.ini rename to latest/overlay/etc/php84/conf.d/00_apcu.ini diff --git a/latest/overlay/etc/php83/conf.d/00_ctype.ini b/latest/overlay/etc/php84/conf.d/00_ctype.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_ctype.ini rename to latest/overlay/etc/php84/conf.d/00_ctype.ini diff --git a/latest/overlay/etc/php83/conf.d/00_curl.ini b/latest/overlay/etc/php84/conf.d/00_curl.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_curl.ini rename to latest/overlay/etc/php84/conf.d/00_curl.ini diff --git a/latest/overlay/etc/php83/conf.d/00_dom.ini b/latest/overlay/etc/php84/conf.d/00_dom.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_dom.ini rename to latest/overlay/etc/php84/conf.d/00_dom.ini diff --git a/latest/overlay/etc/php83/conf.d/00_fileinfo.ini b/latest/overlay/etc/php84/conf.d/00_fileinfo.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_fileinfo.ini rename to latest/overlay/etc/php84/conf.d/00_fileinfo.ini diff --git a/latest/overlay/etc/php83/conf.d/00_gd.ini b/latest/overlay/etc/php84/conf.d/00_gd.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_gd.ini rename to latest/overlay/etc/php84/conf.d/00_gd.ini diff --git a/latest/overlay/etc/php83/conf.d/00_iconv.ini b/latest/overlay/etc/php84/conf.d/00_iconv.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_iconv.ini rename to latest/overlay/etc/php84/conf.d/00_iconv.ini diff --git a/latest/overlay/etc/php83/conf.d/00_intl.ini b/latest/overlay/etc/php84/conf.d/00_intl.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_intl.ini rename to latest/overlay/etc/php84/conf.d/00_intl.ini diff --git a/latest/overlay/etc/php83/conf.d/00_mbstring.ini b/latest/overlay/etc/php84/conf.d/00_mbstring.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_mbstring.ini rename to latest/overlay/etc/php84/conf.d/00_mbstring.ini diff --git a/latest/overlay/etc/php83/conf.d/00_opcache.ini b/latest/overlay/etc/php84/conf.d/00_opcache.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_opcache.ini rename to latest/overlay/etc/php84/conf.d/00_opcache.ini diff --git a/latest/overlay/etc/php83/conf.d/00_openssl.ini b/latest/overlay/etc/php84/conf.d/00_openssl.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_openssl.ini rename to latest/overlay/etc/php84/conf.d/00_openssl.ini diff --git a/latest/overlay/etc/php83/conf.d/00_pdo.ini b/latest/overlay/etc/php84/conf.d/00_pdo.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_pdo.ini rename to latest/overlay/etc/php84/conf.d/00_pdo.ini diff --git a/latest/overlay/etc/php83/conf.d/00_pgsql.ini b/latest/overlay/etc/php84/conf.d/00_pgsql.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_pgsql.ini rename to latest/overlay/etc/php84/conf.d/00_pgsql.ini diff --git a/latest/overlay/etc/php83/conf.d/00_session.ini b/latest/overlay/etc/php84/conf.d/00_session.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_session.ini rename to latest/overlay/etc/php84/conf.d/00_session.ini diff --git a/latest/overlay/etc/php83/conf.d/00_simplexml.ini b/latest/overlay/etc/php84/conf.d/00_simplexml.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_simplexml.ini rename to latest/overlay/etc/php84/conf.d/00_simplexml.ini diff --git a/latest/overlay/etc/php83/conf.d/00_soap.ini b/latest/overlay/etc/php84/conf.d/00_soap.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_soap.ini rename to latest/overlay/etc/php84/conf.d/00_soap.ini diff --git a/latest/overlay/etc/php83/conf.d/00_sqlite3.ini b/latest/overlay/etc/php84/conf.d/00_sqlite3.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_sqlite3.ini rename to latest/overlay/etc/php84/conf.d/00_sqlite3.ini diff --git a/latest/overlay/etc/php83/conf.d/00_tokenizer.ini b/latest/overlay/etc/php84/conf.d/00_tokenizer.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_tokenizer.ini rename to latest/overlay/etc/php84/conf.d/00_tokenizer.ini diff --git a/latest/overlay/etc/php83/conf.d/00_xml.ini b/latest/overlay/etc/php84/conf.d/00_xml.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_xml.ini rename to latest/overlay/etc/php84/conf.d/00_xml.ini diff --git a/latest/overlay/etc/php83/conf.d/00_xmlwriter.ini b/latest/overlay/etc/php84/conf.d/00_xmlwriter.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_xmlwriter.ini rename to latest/overlay/etc/php84/conf.d/00_xmlwriter.ini diff --git a/latest/overlay/etc/php83/conf.d/00_zip.ini b/latest/overlay/etc/php84/conf.d/00_zip.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/00_zip.ini rename to latest/overlay/etc/php84/conf.d/00_zip.ini diff --git a/latest/overlay/etc/php83/conf.d/01_mysqlnd.ini b/latest/overlay/etc/php84/conf.d/01_mysqlnd.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/01_mysqlnd.ini rename to latest/overlay/etc/php84/conf.d/01_mysqlnd.ini diff --git a/latest/overlay/etc/php83/conf.d/01_pdo_pgsql.ini b/latest/overlay/etc/php84/conf.d/01_pdo_pgsql.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/01_pdo_pgsql.ini rename to latest/overlay/etc/php84/conf.d/01_pdo_pgsql.ini diff --git a/latest/overlay/etc/php83/conf.d/01_pdo_sqlite.ini b/latest/overlay/etc/php84/conf.d/01_pdo_sqlite.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/01_pdo_sqlite.ini rename to latest/overlay/etc/php84/conf.d/01_pdo_sqlite.ini diff --git a/latest/overlay/etc/php83/conf.d/01_phar.ini b/latest/overlay/etc/php84/conf.d/01_phar.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/01_phar.ini rename to latest/overlay/etc/php84/conf.d/01_phar.ini diff --git a/latest/overlay/etc/php83/conf.d/02_mysqli.ini b/latest/overlay/etc/php84/conf.d/02_mysqli.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/02_mysqli.ini rename to latest/overlay/etc/php84/conf.d/02_mysqli.ini diff --git a/latest/overlay/etc/php83/conf.d/02_pdo_mysql.ini b/latest/overlay/etc/php84/conf.d/02_pdo_mysql.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/02_pdo_mysql.ini rename to latest/overlay/etc/php84/conf.d/02_pdo_mysql.ini diff --git a/latest/overlay/etc/php83/conf.d/10_igbinary.ini b/latest/overlay/etc/php84/conf.d/10_igbinary.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/10_igbinary.ini rename to latest/overlay/etc/php84/conf.d/10_igbinary.ini diff --git a/latest/overlay/etc/php83/conf.d/10_msgpack.ini b/latest/overlay/etc/php84/conf.d/10_msgpack.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/10_msgpack.ini rename to latest/overlay/etc/php84/conf.d/10_msgpack.ini diff --git a/latest/overlay/etc/php83/conf.d/20_memcached.ini b/latest/overlay/etc/php84/conf.d/20_memcached.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/20_memcached.ini rename to latest/overlay/etc/php84/conf.d/20_memcached.ini diff --git a/latest/overlay/etc/php83/conf.d/20_redis.ini b/latest/overlay/etc/php84/conf.d/20_redis.ini similarity index 100% rename from latest/overlay/etc/php83/conf.d/20_redis.ini rename to latest/overlay/etc/php84/conf.d/20_redis.ini diff --git a/latest/overlay/etc/php83/custom.d/.keep b/latest/overlay/etc/php84/custom.d/.keep similarity index 100% rename from latest/overlay/etc/php83/custom.d/.keep rename to latest/overlay/etc/php84/custom.d/.keep diff --git a/latest/overlay/etc/php83/php-fpm.conf b/latest/overlay/etc/php84/php-fpm.conf similarity index 100% rename from latest/overlay/etc/php83/php-fpm.conf rename to latest/overlay/etc/php84/php-fpm.conf diff --git a/latest/overlay/etc/php83/php.ini b/latest/overlay/etc/php84/php.ini similarity index 100% rename from latest/overlay/etc/php83/php.ini rename to latest/overlay/etc/php84/php.ini diff --git a/latest/overlay/etc/templates/php.ini.tmpl b/latest/overlay/etc/templates/php.ini.tmpl index a77f7ed..08c5571 100644 --- a/latest/overlay/etc/templates/php.ini.tmpl +++ b/latest/overlay/etc/templates/php.ini.tmpl @@ -93,12 +93,12 @@ default_charset = "UTF-8" ;input_encoding = ;output_encoding = -;include_path = ".:/php83/includes" +;include_path = ".:/php84/includes" doc_root = user_dir = -extension_dir = "/usr/lib/php83/modules" +extension_dir = "/usr/lib/php84/modules" ;sys_temp_dir = "/tmp" enable_dl = {{ getenv "PHP_ENABLE_DL" }} @@ -241,7 +241,7 @@ pgsql.log_notice = 0 bcmath.scale = 0 [browscap] -browscap = /etc/php83/browscap.ini +browscap = /etc/php84/browscap.ini [Session] session.save_handler = files diff --git a/latest/overlay/usr/bin/container b/latest/overlay/usr/bin/container index 9704ab9..245847d 100755 --- a/latest/overlay/usr/bin/container +++ b/latest/overlay/usr/bin/container @@ -8,5 +8,5 @@ done pushd ${PHP_WEBROOT} >/dev/null echo "> starting php service" - exec php-fpm8 + exec php-fpm84 popd >/dev/null diff --git a/v8.4/Dockerfile.amd64 b/v8.4/Dockerfile.amd64 new file mode 100644 index 0000000..3a68c5c --- /dev/null +++ b/v8.4/Dockerfile.amd64 @@ -0,0 +1,22 @@ +FROM ghcr.io/dockhippie/alpine:latest-amd64@sha256:d272886ae1ebdd406578fd5bb3b050e770a529f33c98ba20bf5f664118fe352f + +WORKDIR /srv/www +CMD ["/usr/bin/container"] + +ENV PHP_PACKAGE_VERSION=84 + +RUN apk update && \ + apk upgrade && \ + apk add php${PHP_PACKAGE_VERSION} php${PHP_PACKAGE_VERSION}-phpdbg php${PHP_PACKAGE_VERSION}-fpm php${PHP_PACKAGE_VERSION}-ctype php${PHP_PACKAGE_VERSION}-curl php${PHP_PACKAGE_VERSION}-dom php${PHP_PACKAGE_VERSION}-gd php${PHP_PACKAGE_VERSION}-iconv php${PHP_PACKAGE_VERSION}-intl php${PHP_PACKAGE_VERSION}-mysqli php${PHP_PACKAGE_VERSION}-mysqlnd php${PHP_PACKAGE_VERSION}-openssl php${PHP_PACKAGE_VERSION}-opcache php${PHP_PACKAGE_VERSION}-pdo php${PHP_PACKAGE_VERSION}-pdo_mysql php${PHP_PACKAGE_VERSION}-pdo_pgsql php${PHP_PACKAGE_VERSION}-pdo_sqlite php${PHP_PACKAGE_VERSION}-pear php${PHP_PACKAGE_VERSION}-pgsql php${PHP_PACKAGE_VERSION}-phar php${PHP_PACKAGE_VERSION}-sqlite3 php${PHP_PACKAGE_VERSION}-xml php${PHP_PACKAGE_VERSION}-zip php${PHP_PACKAGE_VERSION}-mbstring php${PHP_PACKAGE_VERSION}-simplexml php${PHP_PACKAGE_VERSION}-tokenizer php${PHP_PACKAGE_VERSION}-xmlwriter php${PHP_PACKAGE_VERSION}-fileinfo php${PHP_PACKAGE_VERSION}-soap php${PHP_PACKAGE_VERSION}-pecl-apcu php${PHP_PACKAGE_VERSION}-pecl-redis php${PHP_PACKAGE_VERSION}-pecl-memcached git && \ + ln -sf /usr/bin/php${PHP_PACKAGE_VERSION} /usr/bin/php && \ + groupadd -g 1000 php && \ + useradd -u 1000 -d /srv/www -g php -s /bin/bash -M php && \ + rm -rf /var/cache/apk/* /etc/php${PHP_PACKAGE_VERSION}/* + +VOLUME ["/etc/php${PHP_PACKAGE_VERSION}/custom.d"] +EXPOSE 9000 + +COPY ./overlay / + +RUN curl -sSLo - https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ + curl -sSLo /etc/php${PHP_PACKAGE_VERSION}/browscap.ini http://browscap.org/stream\?q=PHP_BrowsCapINI diff --git a/v8.4/Dockerfile.arm b/v8.4/Dockerfile.arm new file mode 100644 index 0000000..f52f98f --- /dev/null +++ b/v8.4/Dockerfile.arm @@ -0,0 +1,22 @@ +FROM ghcr.io/dockhippie/alpine:latest-arm@sha256:de9ee232aec6a8ed575b66cb77b02e448314acc87cea68cb537ee31a3c118e53 + +WORKDIR /srv/www +CMD ["/usr/bin/container"] + +ENV PHP_PACKAGE_VERSION=84 + +RUN apk update && \ + apk upgrade && \ + apk add php${PHP_PACKAGE_VERSION} php${PHP_PACKAGE_VERSION}-phpdbg php${PHP_PACKAGE_VERSION}-fpm php${PHP_PACKAGE_VERSION}-ctype php${PHP_PACKAGE_VERSION}-curl php${PHP_PACKAGE_VERSION}-dom php${PHP_PACKAGE_VERSION}-gd php${PHP_PACKAGE_VERSION}-iconv php${PHP_PACKAGE_VERSION}-intl php${PHP_PACKAGE_VERSION}-mysqli php${PHP_PACKAGE_VERSION}-mysqlnd php${PHP_PACKAGE_VERSION}-openssl php${PHP_PACKAGE_VERSION}-opcache php${PHP_PACKAGE_VERSION}-pdo php${PHP_PACKAGE_VERSION}-pdo_mysql php${PHP_PACKAGE_VERSION}-pdo_pgsql php${PHP_PACKAGE_VERSION}-pdo_sqlite php${PHP_PACKAGE_VERSION}-pear php${PHP_PACKAGE_VERSION}-pgsql php${PHP_PACKAGE_VERSION}-phar php${PHP_PACKAGE_VERSION}-sqlite3 php${PHP_PACKAGE_VERSION}-xml php${PHP_PACKAGE_VERSION}-zip php${PHP_PACKAGE_VERSION}-mbstring php${PHP_PACKAGE_VERSION}-simplexml php${PHP_PACKAGE_VERSION}-tokenizer php${PHP_PACKAGE_VERSION}-xmlwriter php${PHP_PACKAGE_VERSION}-fileinfo php${PHP_PACKAGE_VERSION}-soap php${PHP_PACKAGE_VERSION}-pecl-apcu php${PHP_PACKAGE_VERSION}-pecl-redis php${PHP_PACKAGE_VERSION}-pecl-memcached git && \ + ln -sf /usr/bin/php${PHP_PACKAGE_VERSION} /usr/bin/php && \ + groupadd -g 1000 php && \ + useradd -u 1000 -d /srv/www -g php -s /bin/bash -M php && \ + rm -rf /var/cache/apk/* /etc/php${PHP_PACKAGE_VERSION}/* + +VOLUME ["/etc/php${PHP_PACKAGE_VERSION}/custom.d"] +EXPOSE 9000 + +COPY ./overlay / + +RUN curl -sSLo - https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ + curl -sSLo /etc/php${PHP_PACKAGE_VERSION}/browscap.ini http://browscap.org/stream\?q=PHP_BrowsCapINI diff --git a/v8.4/Dockerfile.arm64 b/v8.4/Dockerfile.arm64 new file mode 100644 index 0000000..981e185 --- /dev/null +++ b/v8.4/Dockerfile.arm64 @@ -0,0 +1,22 @@ +FROM ghcr.io/dockhippie/alpine:latest-arm64@sha256:f8160544a697b291e7399c65630465247bd673a218d90a9edae343965bc43c51 + +WORKDIR /srv/www +CMD ["/usr/bin/container"] + +ENV PHP_PACKAGE_VERSION=84 + +RUN apk update && \ + apk upgrade && \ + apk add php${PHP_PACKAGE_VERSION} php${PHP_PACKAGE_VERSION}-phpdbg php${PHP_PACKAGE_VERSION}-fpm php${PHP_PACKAGE_VERSION}-ctype php${PHP_PACKAGE_VERSION}-curl php${PHP_PACKAGE_VERSION}-dom php${PHP_PACKAGE_VERSION}-gd php${PHP_PACKAGE_VERSION}-iconv php${PHP_PACKAGE_VERSION}-intl php${PHP_PACKAGE_VERSION}-mysqli php${PHP_PACKAGE_VERSION}-mysqlnd php${PHP_PACKAGE_VERSION}-openssl php${PHP_PACKAGE_VERSION}-opcache php${PHP_PACKAGE_VERSION}-pdo php${PHP_PACKAGE_VERSION}-pdo_mysql php${PHP_PACKAGE_VERSION}-pdo_pgsql php${PHP_PACKAGE_VERSION}-pdo_sqlite php${PHP_PACKAGE_VERSION}-pear php${PHP_PACKAGE_VERSION}-pgsql php${PHP_PACKAGE_VERSION}-phar php${PHP_PACKAGE_VERSION}-sqlite3 php${PHP_PACKAGE_VERSION}-xml php${PHP_PACKAGE_VERSION}-zip php${PHP_PACKAGE_VERSION}-mbstring php${PHP_PACKAGE_VERSION}-simplexml php${PHP_PACKAGE_VERSION}-tokenizer php${PHP_PACKAGE_VERSION}-xmlwriter php${PHP_PACKAGE_VERSION}-fileinfo php${PHP_PACKAGE_VERSION}-soap php${PHP_PACKAGE_VERSION}-pecl-apcu php${PHP_PACKAGE_VERSION}-pecl-redis php${PHP_PACKAGE_VERSION}-pecl-memcached git && \ + ln -sf /usr/bin/php${PHP_PACKAGE_VERSION} /usr/bin/php && \ + groupadd -g 1000 php && \ + useradd -u 1000 -d /srv/www -g php -s /bin/bash -M php && \ + rm -rf /var/cache/apk/* /etc/php${PHP_PACKAGE_VERSION}/* + +VOLUME ["/etc/php${PHP_PACKAGE_VERSION}/custom.d"] +EXPOSE 9000 + +COPY ./overlay / + +RUN curl -sSLo - https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ + curl -sSLo /etc/php${PHP_PACKAGE_VERSION}/browscap.ini http://browscap.org/stream\?q=PHP_BrowsCapINI diff --git a/v8.4/overlay/etc/container.d/00-user.sh b/v8.4/overlay/etc/container.d/00-user.sh new file mode 100755 index 0000000..574a19a --- /dev/null +++ b/v8.4/overlay/etc/container.d/00-user.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +if [[ ! "$(id -g php)" =~ "${PGID}" ]]; then + echo "> enforcing group id" + groupmod -o -g ${PGID} php +fi + +if [[ ! "$(id -u php)" =~ "${PGID}" ]]; then + echo "> enforcing user id" + usermod -o -u ${PUID} php +fi + +true diff --git a/v8.4/overlay/etc/container.d/05-config.sh b/v8.4/overlay/etc/container.d/05-config.sh new file mode 100755 index 0000000..b115d14 --- /dev/null +++ b/v8.4/overlay/etc/container.d/05-config.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then + echo "> writing fpm config" + gomplate -V \ + -o /etc/php84/php-fpm.conf \ + -f /etc/templates/php-fpm.conf.tmpl + + if [[ $? -ne 0 ]]; then + echo "failed to write fpm config" + exit 1 + fi +fi + +true diff --git a/v8.4/overlay/etc/container.d/10-chown.sh b/v8.4/overlay/etc/container.d/10-chown.sh new file mode 100755 index 0000000..193b326 --- /dev/null +++ b/v8.4/overlay/etc/container.d/10-chown.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +if [[ "${PHP_SKIP_CHOWN}" != "true" ]]; then + echo "> chown webroot files" + find ${PHP_WEBROOT} \( \! -user php -o \! -group php \) -print0 | xargs -0 -r chown php:php +fi + +true diff --git a/v8.4/overlay/etc/container.d/15-composer.sh b/v8.4/overlay/etc/container.d/15-composer.sh new file mode 100755 index 0000000..a945167 --- /dev/null +++ b/v8.4/overlay/etc/container.d/15-composer.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +pushd ${PHP_COMPOSER_ROOT} >/dev/null + if [ -f composer.json ]; then + if [ -n "${GITHUB_TOKEN}" ]; then + echo "> set github token" + su-exec php composer \ + config \ + -n \ + -g github-oauth.github.com \ + ${GITHUB_TOKEN} + fi + + if [[ "${PHP_COMPOSER_INSTALL}" == "true" ]]; then + echo "> install composer deps" + + n=0 + until [ $n -ge 5 ]; do + su-exec php composer \ + install \ + --no-dev \ + --no-scripts \ + -n \ + -q \ + --working-dir ${PHP_COMPOSER_ROOT} && break + + n=$(($n+1)) + sleep 3 + done + fi + fi +popd >/dev/null + +true diff --git a/v8.4/overlay/etc/entrypoint.d/00-user.sh b/v8.4/overlay/etc/entrypoint.d/00-user.sh new file mode 100755 index 0000000..c095f43 --- /dev/null +++ b/v8.4/overlay/etc/entrypoint.d/00-user.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +declare -x PUID +[[ -z "${PUID}" ]] && PUID="1000" + +declare -x PGID +[[ -z "${PGID}" ]] && PGID="1000" + +true diff --git a/v8.4/overlay/etc/entrypoint.d/05-php.sh b/v8.4/overlay/etc/entrypoint.d/05-php.sh new file mode 100755 index 0000000..903218a --- /dev/null +++ b/v8.4/overlay/etc/entrypoint.d/05-php.sh @@ -0,0 +1,117 @@ +#!/usr/bin/env bash + +declare -x GITHUB_TOKEN +[[ -z "${GITHUB_TOKEN}" ]] && GITHUB_TOKEN="" + +declare -x PHP_LISTEN_MODE +[[ -z "${PHP_LISTEN_MODE}" ]] && PHP_LISTEN_MODE="0660" + +declare -x PHP_PING_PATH +[[ -z "${PHP_PING_PATH}" ]] && PHP_PING_PATH="/ping" + +declare -x PHP_PING_RESPONSE +[[ -z "${PHP_PING_RESPONSE}" ]] && PHP_PING_RESPONSE="pong" + +declare -x PHP_STATUS_PATH +[[ -z "${PHP_STATUS_PATH}" ]] && PHP_STATUS_PATH="/status" + +declare -x PHP_STATUS_LISTEN +[[ -z "${PHP_STATUS_LISTEN}" ]] && PHP_STATUS_LISTEN="0.0.0.0:9001" + +declare -x PHP_OUTPUT_BUFFERING +[[ -z "${PHP_OUTPUT_BUFFERING}" ]] && PHP_OUTPUT_BUFFERING="4096" + +declare -x PHP_EXPOSE_HEADER +[[ -z "${PHP_EXPOSE_HEADER}" ]] && PHP_EXPOSE_HEADER="On" + +declare -x PHP_ENABLE_DL +[[ -z "${PHP_ENABLE_DL}" ]] && PHP_ENABLE_DL="Off" + +declare -x PHP_MEMORY_LIMIT +[[ -z "${PHP_MEMORY_LIMIT}" ]] && PHP_MEMORY_LIMIT="1G" + +declare -x PHP_ERROR_REPORTING +[[ -z "${PHP_ERROR_REPORTING}" ]] && PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT" + +declare -x PHP_DISPLAY_ERRORS +[[ -z "${PHP_DISPLAY_ERRORS}" ]] && PHP_DISPLAY_ERRORS="On" + +declare -x PHP_DISPLAY_STARTUP_ERRORS +[[ -z "${PHP_DISPLAY_STARTUP_ERRORS}" ]] && PHP_DISPLAY_STARTUP_ERRORS="On" + +declare -x PHP_ERROR_LOG +[[ -z "${PHP_ERROR_LOG}" ]] && PHP_ERROR_LOG="/proc/self/fd/2" + +declare -x PHP_LOG_ERRORS +[[ -z "${PHP_LOG_ERRORS}" ]] && PHP_LOG_ERRORS="On" + +declare -x PHP_LOG_ERRORS_MAX_LEN +[[ -z "${PHP_LOG_ERRORS_MAX_LEN}" ]] && PHP_LOG_ERRORS_MAX_LEN="1024" + +declare -x PHP_IGNORE_REPEATED_ERRORS +[[ -z "${PHP_IGNORE_REPEATED_ERRORS}" ]] && PHP_IGNORE_REPEATED_ERRORS="Off" + +declare -x PHP_IGNORE_REPEATED_SOURCE +[[ -z "${PHP_IGNORE_REPEATED_SOURCE}" ]] && PHP_IGNORE_REPEATED_SOURCE="Off" + +declare -x PHP_REPORT_MEMLEAKS +[[ -z "${PHP_REPORT_MEMLEAKS}" ]] && PHP_REPORT_MEMLEAKS="On" + +declare -x PHP_TRACK_ERRORS +[[ -z "${PHP_TRACK_ERRORS}" ]] && PHP_TRACK_ERRORS="Off" + +declare -x PHP_HTML_ERRORS +[[ -z "${PHP_HTML_ERRORS}" ]] && PHP_HTML_ERRORS="On" + +declare -x PHP_POST_MAX_SIZE +[[ -z "${PHP_POST_MAX_SIZE}" ]] && PHP_POST_MAX_SIZE="2G" + +declare -x PHP_UPLOAD_MAX_FILESIZE +[[ -z "${PHP_UPLOAD_MAX_FILESIZE}" ]] && PHP_UPLOAD_MAX_FILESIZE="2G" + +declare -x PHP_MAX_FILE_UPLOADS +[[ -z "${PHP_MAX_FILE_UPLOADS}" ]] && PHP_MAX_FILE_UPLOADS="20" + +declare -x PHP_MAX_EXECUTION_TIME +[[ -z "${PHP_MAX_EXECUTION_TIME}" ]] && PHP_MAX_EXECUTION_TIME="3600" + +declare -x PHP_MAX_INPUT_TIME +[[ -z "${PHP_MAX_INPUT_TIME}" ]] && PHP_MAX_INPUT_TIME="3600" + +declare -x PHP_ALLOW_URL_FOPEN +[[ -z "${PHP_ALLOW_URL_FOPEN}" ]] && PHP_ALLOW_URL_FOPEN="On" + +declare -x PHP_ALLOW_URL_INCLUDE +[[ -z "${PHP_ALLOW_URL_INCLUDE}" ]] && PHP_ALLOW_URL_INCLUDE="Off" + +declare -x PHP_DATE_TIMEZONE +[[ -z "${PHP_DATE_TIMEZONE}" ]] && PHP_DATE_TIMEZONE="UTC" + +declare -x PHP_LOG_LEVEL +[[ -z "${PHP_LOG_LEVEL}" ]] && PHP_LOG_LEVEL="warning" + +declare -x PHP_MAX_CHILDREN +[[ -z "${PHP_MAX_CHILDREN}" ]] && PHP_MAX_CHILDREN="75" + +declare -x PHP_MAX_REQUESTS +[[ -z "${PHP_MAX_REQUESTS}" ]] && PHP_MAX_REQUESTS="500" + +declare -x PHP_PROCESS_IDLE_TIMEOUT +[[ -z "${PHP_PROCESS_IDLE_TIMEOUT}" ]] && PHP_PROCESS_IDLE_TIMEOUT="10s" + +declare -x PHP_COMPOSER_INSTALL +[[ -z "${PHP_COMPOSER_INSTALL}" ]] && PHP_COMPOSER_INSTALL="true" + +declare -x PHP_WEBROOT +[[ -z "${PHP_WEBROOT}" ]] && PHP_WEBROOT="/srv/www" + +declare -x PHP_COMPOSER_ROOT +[[ -z "${PHP_COMPOSER_ROOT}" ]] && PHP_COMPOSER_ROOT="${PHP_WEBROOT}" + +declare -x PHP_SKIP_CHOWN +[[ -z "${PHP_SKIP_CHOWN}" ]] && PHP_SKIP_CHOWN="false" + +declare -x PHP_SKIP_TEMPLATES +[[ -z "${PHP_SKIP_TEMPLATES}" ]] && PHP_SKIP_TEMPLATES="false" + +true diff --git a/v8.4/overlay/etc/entrypoint.d/10-config.sh b/v8.4/overlay/etc/entrypoint.d/10-config.sh new file mode 100755 index 0000000..e9618d4 --- /dev/null +++ b/v8.4/overlay/etc/entrypoint.d/10-config.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +if [[ "${PHP_SKIP_TEMPLATES}" != "true" ]]; then + gomplate \ + -o /etc/php84/php.ini \ + -f /etc/templates/php.ini.tmpl || exit 1 + + if [[ $? -ne 0 ]]; then + echo "failed to write php config" + exit 1 + fi +fi + +for TEMPLATE in $(find /etc/php84/custom.d -mindepth 1 -type d); do + RELATIVENAME=${TEMPLATE//\/etc\/php8\/custom.d\//} + + if [ ! -d "/etc/php84/conf.d/${RELATIVENAME}" ]; then + mkdir "/etc/php84/conf.d/${RELATIVENAME}" + fi +done + +for TEMAPLTE in $(find /etc/php84/custom.d -mindepth 1 -type f); do + RELATIVENAME=${TEMPLATE//\/etc\/php8\/custom.d\//} + + ln -sf \ + "/etc/php84/conf.d/${RELATIVENAME}" \ + "/etc/php84/custom.d/${RELATIVENAME}" +done + +true diff --git a/v8.4/overlay/etc/php84/conf.d/00_apcu.ini b/v8.4/overlay/etc/php84/conf.d/00_apcu.ini new file mode 100644 index 0000000..c88758c --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_apcu.ini @@ -0,0 +1,2 @@ +extension=apcu +apc.enable_cli = 1 diff --git a/v8.4/overlay/etc/php84/conf.d/00_ctype.ini b/v8.4/overlay/etc/php84/conf.d/00_ctype.ini new file mode 100644 index 0000000..b4a5080 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_ctype.ini @@ -0,0 +1 @@ +extension=ctype diff --git a/v8.4/overlay/etc/php84/conf.d/00_curl.ini b/v8.4/overlay/etc/php84/conf.d/00_curl.ini new file mode 100644 index 0000000..89fa13d --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_curl.ini @@ -0,0 +1 @@ +extension=curl diff --git a/v8.4/overlay/etc/php84/conf.d/00_dom.ini b/v8.4/overlay/etc/php84/conf.d/00_dom.ini new file mode 100644 index 0000000..62dfbf7 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_dom.ini @@ -0,0 +1 @@ +extension=dom diff --git a/v8.4/overlay/etc/php84/conf.d/00_fileinfo.ini b/v8.4/overlay/etc/php84/conf.d/00_fileinfo.ini new file mode 100644 index 0000000..5dd25c5 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_fileinfo.ini @@ -0,0 +1 @@ +extension=fileinfo diff --git a/v8.4/overlay/etc/php84/conf.d/00_gd.ini b/v8.4/overlay/etc/php84/conf.d/00_gd.ini new file mode 100644 index 0000000..bb35ed0 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_gd.ini @@ -0,0 +1 @@ +extension=gd diff --git a/v8.4/overlay/etc/php84/conf.d/00_iconv.ini b/v8.4/overlay/etc/php84/conf.d/00_iconv.ini new file mode 100644 index 0000000..4711441 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_iconv.ini @@ -0,0 +1 @@ +extension=iconv diff --git a/v8.4/overlay/etc/php84/conf.d/00_intl.ini b/v8.4/overlay/etc/php84/conf.d/00_intl.ini new file mode 100644 index 0000000..63f20e8 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_intl.ini @@ -0,0 +1 @@ +extension=intl diff --git a/v8.4/overlay/etc/php84/conf.d/00_mbstring.ini b/v8.4/overlay/etc/php84/conf.d/00_mbstring.ini new file mode 100644 index 0000000..0e3a392 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_mbstring.ini @@ -0,0 +1 @@ +extension=mbstring diff --git a/v8.4/overlay/etc/php84/conf.d/00_opcache.ini b/v8.4/overlay/etc/php84/conf.d/00_opcache.ini new file mode 100644 index 0000000..592cb59 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_opcache.ini @@ -0,0 +1 @@ +zend_extension=opcache diff --git a/v8.4/overlay/etc/php84/conf.d/00_openssl.ini b/v8.4/overlay/etc/php84/conf.d/00_openssl.ini new file mode 100644 index 0000000..355624b --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_openssl.ini @@ -0,0 +1 @@ +extension=openssl diff --git a/v8.4/overlay/etc/php84/conf.d/00_pdo.ini b/v8.4/overlay/etc/php84/conf.d/00_pdo.ini new file mode 100644 index 0000000..ef45300 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_pdo.ini @@ -0,0 +1 @@ +extension=pdo diff --git a/v8.4/overlay/etc/php84/conf.d/00_pgsql.ini b/v8.4/overlay/etc/php84/conf.d/00_pgsql.ini new file mode 100644 index 0000000..ba09314 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_pgsql.ini @@ -0,0 +1 @@ +extension=pgsql diff --git a/v8.4/overlay/etc/php84/conf.d/00_session.ini b/v8.4/overlay/etc/php84/conf.d/00_session.ini new file mode 100644 index 0000000..7482518 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_session.ini @@ -0,0 +1 @@ +extension=session diff --git a/v8.4/overlay/etc/php84/conf.d/00_simplexml.ini b/v8.4/overlay/etc/php84/conf.d/00_simplexml.ini new file mode 100644 index 0000000..c88c0ae --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_simplexml.ini @@ -0,0 +1 @@ +extension=simplexml diff --git a/v8.4/overlay/etc/php84/conf.d/00_soap.ini b/v8.4/overlay/etc/php84/conf.d/00_soap.ini new file mode 100644 index 0000000..093d39d --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_soap.ini @@ -0,0 +1 @@ +extension=soap diff --git a/v8.4/overlay/etc/php84/conf.d/00_sqlite3.ini b/v8.4/overlay/etc/php84/conf.d/00_sqlite3.ini new file mode 100644 index 0000000..7ee602b --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_sqlite3.ini @@ -0,0 +1 @@ +extension=sqlite3 diff --git a/v8.4/overlay/etc/php84/conf.d/00_tokenizer.ini b/v8.4/overlay/etc/php84/conf.d/00_tokenizer.ini new file mode 100644 index 0000000..1151201 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_tokenizer.ini @@ -0,0 +1 @@ +extension=tokenizer diff --git a/v8.4/overlay/etc/php84/conf.d/00_xml.ini b/v8.4/overlay/etc/php84/conf.d/00_xml.ini new file mode 100644 index 0000000..971783d --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_xml.ini @@ -0,0 +1 @@ +extension=xml diff --git a/v8.4/overlay/etc/php84/conf.d/00_xmlwriter.ini b/v8.4/overlay/etc/php84/conf.d/00_xmlwriter.ini new file mode 100644 index 0000000..b0e4366 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_xmlwriter.ini @@ -0,0 +1 @@ +extension=xmlwriter diff --git a/v8.4/overlay/etc/php84/conf.d/00_zip.ini b/v8.4/overlay/etc/php84/conf.d/00_zip.ini new file mode 100644 index 0000000..08a7894 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/00_zip.ini @@ -0,0 +1 @@ +extension=zip diff --git a/v8.4/overlay/etc/php84/conf.d/01_mysqlnd.ini b/v8.4/overlay/etc/php84/conf.d/01_mysqlnd.ini new file mode 100644 index 0000000..d09bf60 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/01_mysqlnd.ini @@ -0,0 +1 @@ +extension=mysqlnd diff --git a/v8.4/overlay/etc/php84/conf.d/01_pdo_pgsql.ini b/v8.4/overlay/etc/php84/conf.d/01_pdo_pgsql.ini new file mode 100644 index 0000000..4e9b984 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/01_pdo_pgsql.ini @@ -0,0 +1 @@ +extension=pdo_pgsql diff --git a/v8.4/overlay/etc/php84/conf.d/01_pdo_sqlite.ini b/v8.4/overlay/etc/php84/conf.d/01_pdo_sqlite.ini new file mode 100644 index 0000000..603c36a --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/01_pdo_sqlite.ini @@ -0,0 +1 @@ +extension=pdo_sqlite diff --git a/v8.4/overlay/etc/php84/conf.d/01_phar.ini b/v8.4/overlay/etc/php84/conf.d/01_phar.ini new file mode 100644 index 0000000..c535cef --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/01_phar.ini @@ -0,0 +1 @@ +extension=phar diff --git a/v8.4/overlay/etc/php84/conf.d/02_mysqli.ini b/v8.4/overlay/etc/php84/conf.d/02_mysqli.ini new file mode 100644 index 0000000..206dcfa --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/02_mysqli.ini @@ -0,0 +1 @@ +extension=mysqli diff --git a/v8.4/overlay/etc/php84/conf.d/02_pdo_mysql.ini b/v8.4/overlay/etc/php84/conf.d/02_pdo_mysql.ini new file mode 100644 index 0000000..3c0b799 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/02_pdo_mysql.ini @@ -0,0 +1 @@ +extension=pdo_mysql diff --git a/v8.4/overlay/etc/php84/conf.d/10_igbinary.ini b/v8.4/overlay/etc/php84/conf.d/10_igbinary.ini new file mode 100644 index 0000000..8c1c3ae --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/10_igbinary.ini @@ -0,0 +1 @@ +extension=igbinary diff --git a/v8.4/overlay/etc/php84/conf.d/10_msgpack.ini b/v8.4/overlay/etc/php84/conf.d/10_msgpack.ini new file mode 100644 index 0000000..72f803d --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/10_msgpack.ini @@ -0,0 +1 @@ +extension=msgpack diff --git a/v8.4/overlay/etc/php84/conf.d/20_memcached.ini b/v8.4/overlay/etc/php84/conf.d/20_memcached.ini new file mode 100644 index 0000000..428eb8d --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/20_memcached.ini @@ -0,0 +1 @@ +extension=memcached diff --git a/v8.4/overlay/etc/php84/conf.d/20_redis.ini b/v8.4/overlay/etc/php84/conf.d/20_redis.ini new file mode 100644 index 0000000..b27ef00 --- /dev/null +++ b/v8.4/overlay/etc/php84/conf.d/20_redis.ini @@ -0,0 +1 @@ +extension=redis diff --git a/v8.4/overlay/etc/php84/custom.d/.keep b/v8.4/overlay/etc/php84/custom.d/.keep new file mode 100644 index 0000000..e69de29 diff --git a/v8.4/overlay/etc/php84/php-fpm.conf b/v8.4/overlay/etc/php84/php-fpm.conf new file mode 100644 index 0000000..e69de29 diff --git a/v8.4/overlay/etc/php84/php.ini b/v8.4/overlay/etc/php84/php.ini new file mode 100644 index 0000000..e69de29 diff --git a/v8.4/overlay/etc/templates/php-fpm.conf.tmpl b/v8.4/overlay/etc/templates/php-fpm.conf.tmpl new file mode 100644 index 0000000..ea63461 --- /dev/null +++ b/v8.4/overlay/etc/templates/php-fpm.conf.tmpl @@ -0,0 +1,37 @@ +[global] +error_log = {{ getenv "PHP_ERROR_LOG" }} +log_level = {{ getenv "PHP_LOG_LEVEL" }} + +daemonize = no + +[www] +user = php +group = php + +listen = 0.0.0.0:9000 +listen.owner = php +listen.group = php +listen.mode = {{ getenv "PHP_LISTEN_MODE" }} + +pm = ondemand +pm.max_children = {{ getenv "PHP_MAX_CHILDREN" }} +pm.max_requests = {{ getenv "PHP_MAX_REQUESTS" }} +pm.process_idle_timeout = {{ getenv "PHP_PROCESS_IDLE_TIMEOUT" }} +{{ if ne (getenv "PHP_STATUS_PATH") "" }} + +pm.status_path = {{ getenv "PHP_STATUS_PATH" }} +pm.status_listen = {{ getenv "PHP_STATUS_LISTEN" }} +{{ end }} +{{ if ne (getenv "PHP_PING_PATH") "" }} + +ping.path = {{ getenv "PHP_PING_PATH" }} +ping.response = {{ getenv "PHP_PING_RESPONSE" }} +{{ end }} + +chdir = {{ getenv "PHP_WEBROOT" }} + +env[HOSTNAME] = $HOSTNAME +env[PATH] = /usr/local/bin:/usr/bin:/bin +env[TMP] = /tmp +env[TMPDIR] = /tmp +env[TEMP] = /tmp diff --git a/v8.4/overlay/etc/templates/php.ini.tmpl b/v8.4/overlay/etc/templates/php.ini.tmpl new file mode 100644 index 0000000..08c5571 --- /dev/null +++ b/v8.4/overlay/etc/templates/php.ini.tmpl @@ -0,0 +1,394 @@ +[PHP] +user_ini.filename = ".user.ini" +user_ini.cache_ttl = 300 + +engine = On +short_open_tag = Off + +precision = 14 + +output_buffering = {{ getenv "PHP_OUTPUT_BUFFERING" }} +;output_handler = + +;url_rewriter.tags +;url_rewriter.hosts + +zlib.output_compression = Off +;zlib.output_compression_level = -1 +;zlib.output_handler = + +implicit_flush = Off + +unserialize_callback_func = +;unserialize_max_depth = 4096 +serialize_precision = -1 + +;open_basedir = + +disable_functions = +disable_classes = + +;highlight.string = #DD0000 +;highlight.comment = #FF9900 +;highlight.keyword = #007700 +;highlight.default = #0000BB +;highlight.html = #000000 + +;ignore_user_abort = On + +;realpath_cache_size = 16k +;realpath_cache_ttl = 120 + +zend.enable_gc = On +;zend.multibyte = Off +;zend.script_encoding = +zend.exception_ignore_args = On +zend.exception_string_param_max_len = 0 + +expose_php = {{ getenv "PHP_EXPOSE_HEADER" }} + +max_execution_time = {{ getenv "PHP_MAX_EXECUTION_TIME" }} +max_input_time = {{ getenv "PHP_MAX_INPUT_TIME" }} +;max_input_nesting_level = 64 +;max_input_vars = 1000 +memory_limit = {{ getenv "PHP_MEMORY_LIMIT" }} + +error_reporting = {{ getenv "PHP_ERROR_REPORTING" }} +display_errors = {{ getenv "PHP_DISPLAY_ERRORS" }} +display_startup_errors = {{ getenv "PHP_DISPLAY_STARTUP_ERRORS" }} +log_errors = {{ getenv "PHP_LOG_ERRORS" }} +log_errors_max_len = {{ getenv "PHP_LOG_ERRORS_MAX_LEN" }} +ignore_repeated_errors = {{ getenv "PHP_IGNORE_REPEATED_ERRORS" }} +ignore_repeated_source = {{ getenv "PHP_IGNORE_REPEATED_SOURCE" }} +report_memleaks = {{ getenv "PHP_REPORT_MEMLEAKS" }} +;report_zend_debug = 0 +track_errors = {{ getenv "PHP_TRACK_ERRORS" }} +;xmlrpc_errors = 0 +;xmlrpc_error_number = 0 +html_errors = {{ getenv "PHP_HTML_ERRORS" }} +;docref_root = "/phpmanual/" +;docref_ext = .html +;error_prepend_string = "" +;error_append_string = "" +error_log = "{{ getenv "PHP_ERROR_LOG" }}" +;windows.show_crt_warning + +;arg_separator.output = "&" +;arg_separator.input = ";&" + +variables_order = "GPCS" +request_order = "GP" + +register_argc_argv = Off +auto_globals_jit = On +;enable_post_data_reading = Off +post_max_size = {{ getenv "PHP_POST_MAX_SIZE" }} + +auto_prepend_file = +auto_append_file = + +default_mimetype = "text/html" +default_charset = "UTF-8" +;internal_encoding = +;input_encoding = +;output_encoding = + +;include_path = ".:/php84/includes" + +doc_root = +user_dir = + +extension_dir = "/usr/lib/php84/modules" +;sys_temp_dir = "/tmp" +enable_dl = {{ getenv "PHP_ENABLE_DL" }} + +;cgi.force_redirect = 1 +;cgi.nph = 1 +;cgi.redirect_status_env = +cgi.fix_pathinfo = 0 +cgi.discard_path = 1 + +;fastcgi.impersonate = 1 +;fastcgi.logging = 0 +;cgi.rfc2616_headers = 0 +;cgi.check_shebang_line = 1 + +file_uploads = On +;upload_tmp_dir = +upload_max_filesize = {{ getenv "PHP_UPLOAD_MAX_FILESIZE" }} +max_file_uploads = {{ getenv "PHP_MAX_FILE_UPLOADS" }} + +allow_url_fopen = {{ getenv "PHP_ALLOW_URL_FOPEN" }} +allow_url_include = {{ getenv "PHP_ALLOW_URL_INCLUDE" }} + +;from="john@doe.com" +;user_agent="PHP" + +default_socket_timeout = 60 +;auto_detect_line_endings = Off + +[CLI Server] +cli_server.color = On + +[Date] +date.timezone = {{ getenv "PHP_DATE_TIMEZONE" }} +;date.default_latitude = 31.7667 +;date.default_longitude = 35.2333 +;date.sunrise_zenith = 90.583333 +;date.sunset_zenith = 90.583333 + +[filter] +;filter.default = unsafe_raw +;filter.default_flags = + +[iconv] +;iconv.input_encoding = +;iconv.internal_encoding = +;iconv.output_encoding = + +[intl] +;intl.default_locale = +;intl.error_level = E_WARNING +;intl.use_exceptions = 0 + +[sqlite3] +;sqlite3.extension_dir = +;sqlite3.defensive = 1 + +[Pcre] +;pcre.backtrack_limit = 100000 +;pcre.recursion_limit = 100000 +;pcre.jit = 1 + +[Pdo] +;pdo_odbc.connection_pooling = strict + +[Pdo_mysql] +pdo_mysql.default_socket = + +[Phar] +;phar.readonly = On +;phar.require_hash = On +;phar.cache_list = + +[mail function] +SMTP = localhost +smtp_port = 25 +;sendmail_path = + +;mail.force_extra_parameters = +mail.add_x_header = On +;mail.log = +;mail.log = syslog +;mail.force_extra_parameters = +mail.add_x_header = Off + +[ODBC] +;odbc.default_db = Not yet implemented +;odbc.default_user = Not yet implemented +;odbc.default_pw = Not yet implemented +;odbc.default_cursortype +odbc.allow_persistent = On +odbc.check_persistent = On +odbc.max_persistent = -1 +odbc.max_links = -1 +odbc.defaultlrl = 4096 +odbc.defaultbinmode = 1 + +[MySQLi] +mysqli.max_persistent = -1 +;mysqli.allow_local_infile = On +mysqli.allow_persistent = On +mysqli.max_links = -1 +mysqli.default_port = 3306 +mysqli.default_socket = +mysqli.default_host = +mysqli.default_user = +mysqli.default_pw = +mysqli.reconnect = Off + +[mysqlnd] +mysqlnd.collect_statistics = On +mysqlnd.collect_memory_statistics = Off +;mysqlnd.debug = +;mysqlnd.log_mask = 0 +;mysqlnd.mempool_default_size = 16000 +;mysqlnd.net_cmd_buffer_size = 2048 +;mysqlnd.net_read_buffer_size = 32768 +;mysqlnd.net_read_timeout = 31536000 +;mysqlnd.sha256_server_public_key = + +[OCI8] +;oci8.privileged_connect = Off +;oci8.max_persistent = -1 +;oci8.persistent_timeout = -1 +;oci8.ping_interval = 60 +;oci8.connection_class = +;oci8.events = Off +;oci8.statement_cache_size = 20 +;oci8.default_prefetch = 100 +;oci8.old_oci_close_semantics = Off + +[PostgreSQL] +pgsql.allow_persistent = On +pgsql.auto_reset_persistent = Off +pgsql.max_persistent = -1 +pgsql.max_links = -1 +pgsql.ignore_notice = 0 +pgsql.log_notice = 0 + +[bcmath] +bcmath.scale = 0 + +[browscap] +browscap = /etc/php84/browscap.ini + +[Session] +session.save_handler = files +;session.save_path = "/tmp" +session.use_strict_mode = 0 +session.use_cookies = 1 +;session.cookie_secure = +session.use_only_cookies = 1 +session.name = PHPSESSID +session.auto_start = 0 +session.cookie_lifetime = 0 +session.cookie_path = / +session.cookie_domain = +session.cookie_httponly = +session.cookie_samesite = +session.serialize_handler = php +session.gc_probability = 1 +session.gc_divisor = 1000 +session.gc_maxlifetime = 1440 +session.referer_check = +session.cache_limiter = nocache +session.cache_expire = 180 +session.use_trans_sid = 0 +session.sid_length = 26 +session.trans_sid_tags = "a=href,area=href,frame=src,form=" +;session.trans_sid_hosts = "" +session.sid_bits_per_character = 5 +;session.upload_progress.enabled = On +;session.upload_progress.cleanup = On +;session.upload_progress.prefix = "upload_progress_" +;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" +;session.upload_progress.freq = "1%" +;session.upload_progress.min_freq = "1" +;session.lazy_write = On + +[Assertion] +zend.assertions = -1 +;assert.active = On +;assert.exception = On +;assert.warning = On +;assert.bail = Off +;assert.callback = 0 + +[COM] +;com.typelib_file = +;com.allow_dcom = true +;com.autoregister_typelib = true +;com.autoregister_casesensitive = false +;com.autoregister_verbose = true +;com.code_page= +;com.dotnet_version= + +[mbstring] +;mbstring.language = Japanese +;mbstring.internal_encoding = +;mbstring.http_input = +;mbstring.http_output = +;mbstring.encoding_translation = Off +;mbstring.detect_order = auto +;mbstring.substitute_character = none +;mbstring.func_overload = 0 +;mbstring.strict_detection = On +;mbstring.http_output_conv_mimetype = +;mbstring.regex_stack_limit = 100000 +;mbstring.regex_retry_limit = 1000000 + +[gd] +;gd.jpeg_ignore_warning = 0 + +[exif] +;exif.encode_unicode = ISO-8859-15 +;exif.decode_unicode_motorola = UCS-2BE +;exif.decode_unicode_intel = UCS-2LE +;exif.encode_jis = +;exif.decode_jis_motorola = JIS +;exif.decode_jis_intel = JIS + +[Tidy] +;tidy.default_config = /usr/local/lib/php/default.tcfg +tidy.clean_output = Off + +[soap] +soap.wsdl_cache_enabled = 1 +soap.wsdl_cache_dir = "/tmp" +soap.wsdl_cache_ttl = 86400 +soap.wsdl_cache_limit = 5 + +[sysvshm] +;sysvshm.init_mem = 10000 + +[ldap] +ldap.max_links = -1 + +[mcrypt] +;mcrypt.algorithms_dir = +;mcrypt.modes_dir = + +[dba] +;dba.default_handler = + +[opcache] +;opcache.enable = 1 +;opcache.enable_cli = 0 +;opcache.memory_consumption = 128 +;opcache.interned_strings_buffer = 8 +;opcache.max_accelerated_files = 10000 +;opcache.max_wasted_percentage = 5 +;opcache.use_cwd = 1 +;opcache.validate_timestamps = 1 +;opcache.revalidate_freq = 2 +;opcache.revalidate_path = 0 +;opcache.save_comments = 1 +;opcache.record_warnings = 0 +;opcache.enable_file_override = 0 +;opcache.optimization_level = 0xffffffff +;opcache.dups_fix = 0 +;opcache.blacklist_filename = +;opcache.max_file_size = 0 +;opcache.consistency_checks = 0 +;opcache.force_restart_timeout = 180 +;opcache.error_log = +;opcache.log_verbosity_level = 1 +;opcache.preferred_memory_model = +;opcache.protect_memory = 0 +;opcache.restrict_api = +;opcache.mmap_base = +;opcache.cache_id = +;opcache.file_cache = +;opcache.file_cache_only = 0 +;opcache.file_cache_consistency_checks = 1 +;opcache.file_cache_fallback = 1 +;opcache.huge_code_pages = 1 +;opcache.validate_permission = 0 +;opcache.validate_root = 0 +;opcache.opt_debug_level = 0 +;opcache.preload = +;opcache.preload_user = +;opcache.file_update_protection = 2 +;opcache.lockfile_path = /tmp + +[curl] +curl.cainfo = /etc/ssl/certs/ca-certificates.crt + +[openssl] +openssl.cafile = /etc/ssl/certs/ca-certificates.crt +openssl.capath = /etc/ssl/certs + +[ffi] +;ffi.enable = preload +;ffi.preload = diff --git a/v8.4/overlay/usr/bin/container b/v8.4/overlay/usr/bin/container new file mode 100755 index 0000000..245847d --- /dev/null +++ b/v8.4/overlay/usr/bin/container @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -eo pipefail +source /usr/bin/entrypoint + +for FILE in $(find /etc/container.d -type f -iname \*.sh | sort); do + source ${FILE} +done + +pushd ${PHP_WEBROOT} >/dev/null + echo "> starting php service" + exec php-fpm84 +popd >/dev/null diff --git a/v8.4/overlay/usr/bin/entrypoint b/v8.4/overlay/usr/bin/entrypoint new file mode 100755 index 0000000..19618c7 --- /dev/null +++ b/v8.4/overlay/usr/bin/entrypoint @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +for FILE in $(find /etc/entrypoint.d -type f -iname \*.sh | sort); do + source ${FILE} +done + +if [[ "${0}" == "/usr/bin/entrypoint" ]]; then + pushd ${PHP_WEBROOT} >/dev/null + exec $@ + popd >/dev/null +fi