From 2cad279d12027a5b694ee921a5ff950ab58c31a9 Mon Sep 17 00:00:00 2001 From: lotyp Date: Mon, 15 May 2023 15:41:19 +0300 Subject: [PATCH] feat: merge docker-php-prod with docker-php-base --- .github/workflows/ci.yml | 110 ------------------ .github/workflows/upload-assets.yml | 32 +++++ .gitignore | 1 + Makefile | 1 + README.md | 45 ++++++- dist/base/7.4-cli-alpine/Dockerfile | 79 ------------- dist/base/7.4-cli-alpine/configs/opcache.ini | 8 -- dist/base/7.4-cli-alpine/configs/php.ini | 25 ---- dist/base/7.4-cli-alpine/goss.yaml | 54 --------- dist/base/7.4-fpm-alpine/Dockerfile | 80 ------------- dist/base/7.4-fpm-alpine/configs/opcache.ini | 8 -- dist/base/7.4-fpm-alpine/configs/php.ini | 25 ---- dist/base/7.4-fpm-alpine/goss.yaml | 65 ----------- dist/base/7.4-supervisord-alpine/Dockerfile | 79 ------------- .../configs/opcache.ini | 8 -- .../7.4-supervisord-alpine/configs/php.ini | 25 ---- dist/base/7.4-supervisord-alpine/goss.yaml | 54 --------- dist/base/8.0-cli-alpine/Dockerfile | 79 ------------- dist/base/8.0-cli-alpine/configs/opcache.ini | 8 -- dist/base/8.0-cli-alpine/configs/php.ini | 25 ---- dist/base/8.0-cli-alpine/goss.yaml | 54 --------- dist/base/8.0-fpm-alpine/Dockerfile | 80 ------------- dist/base/8.0-fpm-alpine/configs/opcache.ini | 8 -- dist/base/8.0-fpm-alpine/configs/php.ini | 25 ---- dist/base/8.0-fpm-alpine/goss.yaml | 65 ----------- dist/base/8.0-supervisord-alpine/Dockerfile | 79 ------------- .../configs/opcache.ini | 8 -- .../8.0-supervisord-alpine/configs/php.ini | 25 ---- dist/base/8.0-supervisord-alpine/goss.yaml | 54 --------- dist/base/8.1-cli-alpine/Dockerfile | 79 ------------- dist/base/8.1-cli-alpine/configs/opcache.ini | 8 -- dist/base/8.1-cli-alpine/configs/php.ini | 25 ---- dist/base/8.1-cli-alpine/goss.yaml | 54 --------- dist/base/8.1-fpm-alpine/Dockerfile | 80 ------------- dist/base/8.1-fpm-alpine/configs/opcache.ini | 8 -- dist/base/8.1-fpm-alpine/configs/php.ini | 25 ---- dist/base/8.1-fpm-alpine/goss.yaml | 65 ----------- dist/base/8.1-supervisord-alpine/Dockerfile | 79 ------------- .../configs/opcache.ini | 8 -- .../8.1-supervisord-alpine/configs/php.ini | 25 ---- dist/base/8.1-supervisord-alpine/goss.yaml | 54 --------- dist/base/8.2-cli-alpine/Dockerfile | 79 ------------- dist/base/8.2-cli-alpine/configs/opcache.ini | 8 -- dist/base/8.2-cli-alpine/configs/php.ini | 25 ---- dist/base/8.2-cli-alpine/goss.yaml | 54 --------- dist/base/8.2-fpm-alpine/Dockerfile | 80 ------------- dist/base/8.2-fpm-alpine/configs/opcache.ini | 8 -- dist/base/8.2-fpm-alpine/configs/php.ini | 25 ---- dist/base/8.2-fpm-alpine/goss.yaml | 65 ----------- dist/base/8.2-supervisord-alpine/Dockerfile | 79 ------------- .../configs/opcache.ini | 8 -- .../8.2-supervisord-alpine/configs/php.ini | 25 ---- dist/base/8.2-supervisord-alpine/goss.yaml | 54 --------- src/Dockerfiles/base/Dockerfile.j2 | 90 +++++++++++++- src/Dockerfiles/base/goss.yaml.j2 | 30 +++++ src/Dockerfiles/base/goss_wait.yaml | 7 ++ src/config/php-fpm.d/docker.conf | 17 +++ src/config/php-fpm.d/www.conf | 76 ++++++++++++ src/config/php-fpm.d/zz-docker.conf | 7 ++ src/config/supervisord.conf | 20 ++++ src/group_vars/base.yml | 53 +++++++-- src/roles/base/main.yml | 29 +++++ 62 files changed, 394 insertions(+), 2164 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/upload-assets.yml delete mode 100644 dist/base/7.4-cli-alpine/Dockerfile delete mode 100644 dist/base/7.4-cli-alpine/configs/opcache.ini delete mode 100644 dist/base/7.4-cli-alpine/configs/php.ini delete mode 100644 dist/base/7.4-cli-alpine/goss.yaml delete mode 100644 dist/base/7.4-fpm-alpine/Dockerfile delete mode 100644 dist/base/7.4-fpm-alpine/configs/opcache.ini delete mode 100644 dist/base/7.4-fpm-alpine/configs/php.ini delete mode 100644 dist/base/7.4-fpm-alpine/goss.yaml delete mode 100644 dist/base/7.4-supervisord-alpine/Dockerfile delete mode 100644 dist/base/7.4-supervisord-alpine/configs/opcache.ini delete mode 100644 dist/base/7.4-supervisord-alpine/configs/php.ini delete mode 100644 dist/base/7.4-supervisord-alpine/goss.yaml delete mode 100644 dist/base/8.0-cli-alpine/Dockerfile delete mode 100644 dist/base/8.0-cli-alpine/configs/opcache.ini delete mode 100644 dist/base/8.0-cli-alpine/configs/php.ini delete mode 100644 dist/base/8.0-cli-alpine/goss.yaml delete mode 100644 dist/base/8.0-fpm-alpine/Dockerfile delete mode 100644 dist/base/8.0-fpm-alpine/configs/opcache.ini delete mode 100644 dist/base/8.0-fpm-alpine/configs/php.ini delete mode 100644 dist/base/8.0-fpm-alpine/goss.yaml delete mode 100644 dist/base/8.0-supervisord-alpine/Dockerfile delete mode 100644 dist/base/8.0-supervisord-alpine/configs/opcache.ini delete mode 100644 dist/base/8.0-supervisord-alpine/configs/php.ini delete mode 100644 dist/base/8.0-supervisord-alpine/goss.yaml delete mode 100644 dist/base/8.1-cli-alpine/Dockerfile delete mode 100644 dist/base/8.1-cli-alpine/configs/opcache.ini delete mode 100644 dist/base/8.1-cli-alpine/configs/php.ini delete mode 100644 dist/base/8.1-cli-alpine/goss.yaml delete mode 100644 dist/base/8.1-fpm-alpine/Dockerfile delete mode 100644 dist/base/8.1-fpm-alpine/configs/opcache.ini delete mode 100644 dist/base/8.1-fpm-alpine/configs/php.ini delete mode 100644 dist/base/8.1-fpm-alpine/goss.yaml delete mode 100644 dist/base/8.1-supervisord-alpine/Dockerfile delete mode 100644 dist/base/8.1-supervisord-alpine/configs/opcache.ini delete mode 100644 dist/base/8.1-supervisord-alpine/configs/php.ini delete mode 100644 dist/base/8.1-supervisord-alpine/goss.yaml delete mode 100644 dist/base/8.2-cli-alpine/Dockerfile delete mode 100644 dist/base/8.2-cli-alpine/configs/opcache.ini delete mode 100644 dist/base/8.2-cli-alpine/configs/php.ini delete mode 100644 dist/base/8.2-cli-alpine/goss.yaml delete mode 100644 dist/base/8.2-fpm-alpine/Dockerfile delete mode 100644 dist/base/8.2-fpm-alpine/configs/opcache.ini delete mode 100644 dist/base/8.2-fpm-alpine/configs/php.ini delete mode 100644 dist/base/8.2-fpm-alpine/goss.yaml delete mode 100644 dist/base/8.2-supervisord-alpine/Dockerfile delete mode 100644 dist/base/8.2-supervisord-alpine/configs/opcache.ini delete mode 100644 dist/base/8.2-supervisord-alpine/configs/php.ini delete mode 100644 dist/base/8.2-supervisord-alpine/goss.yaml create mode 100644 src/Dockerfiles/base/goss_wait.yaml create mode 100644 src/config/php-fpm.d/docker.conf create mode 100644 src/config/php-fpm.d/www.conf create mode 100644 src/config/php-fpm.d/zz-docker.conf create mode 100644 src/config/supervisord.conf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0080262..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,110 +0,0 @@ ---- - -name: CI - -on: # yamllint disable-line rule:truthy - push: - branches: - - 'master' - tags: - - 'v*.*.*' - pull_request: - branches: - - 'master' - release: - types: - - 'created' - schedule: - # Every Sunday at 03:10 - - cron: '10 3 * * 0' - -jobs: - build: - name: Build - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php_version: ['7.4', '8.0', '8.1'] - php_type: ['fpm', 'cli'] - os_name: ['alpine'] - steps: - - uses: e1himself/goss-installation-action@v1.0.4 - - - name: Checkout - uses: actions/checkout@v3.1.0 - - - name: Set Environment Variables - env: - IMAGE_NAMESPACE: wayofdev/php-base - IMAGE_TEMPLATE: ${{ matrix.php_version }}-${{ matrix.php_type }}-${{ matrix.os_name }} - run: | - export RELEASE_VERSION=${GITHUB_REF#refs/*/} - echo "IMAGE_NAMESPACE=${IMAGE_NAMESPACE}" >> $GITHUB_ENV - echo "IMAGE_TEMPLATE=${IMAGE_TEMPLATE}" >> $GITHUB_ENV - echo "VERSION=${RELEASE_VERSION:1}" >> $GITHUB_ENV - - - name: Docker Meta - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.IMAGE_NAMESPACE }} - tags: | - type=raw,event=branch,value=latest - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - flavor: | - latest=false - prefix=${{ matrix.php_version }}-${{ matrix.php_type }}-${{ matrix.os_name }}- - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_TOKEN }} - - ### For Cross Platform OSX builds uncomment these lines - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: arm64 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - with: - install: true - - - name: Build and Export to Docker - uses: docker/build-push-action@v3 - with: - context: ./dist/base/${{ env.IMAGE_TEMPLATE }} - load: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=registry,ref=${{ env.IMAGE_TAG }} - cache-to: type=inline - labels: ${{ steps.meta.outputs.labels }} - - - name: Test Docker Release Image - if: success() && startsWith(github.ref, 'refs/tags/') - run: | - IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.IMAGE_TEMPLATE }}-${{ env.VERSION }} make test - - - name: Test Docker Master Image - if: success() && ! startsWith(github.ref, 'refs/tags/') - run: | - IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.IMAGE_TEMPLATE }}-latest make test - - - name: Push Docker Image - uses: docker/build-push-action@v3 - with: - context: ./dist/base/${{ env.IMAGE_TEMPLATE }} - ### For Cross Platform OSX builds uncomment these lines - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=registry,ref=${{ env.IMAGE_TAG }} - cache-to: type=inline - -... diff --git a/.github/workflows/upload-assets.yml b/.github/workflows/upload-assets.yml new file mode 100644 index 0000000..0b45081 --- /dev/null +++ b/.github/workflows/upload-assets.yml @@ -0,0 +1,32 @@ +--- + +# https://github.com/google-github-actions/release-please-action#release-types-supported + +on: # yamllint disable-line rule:truthy + push: + tags: + - "v*.*.*" + +name: 📤 Upload artifacts + +jobs: + upload-artifacts: + runs-on: ubuntu-latest + steps: + - name: 📦 Check out the codebase + uses: actions/checkout@v3 + + - name: 🚀 Generate dist files + run: make generate + + - name: 🗜️ Archive dist files + run: tar -czvf dist.tar.gz dist + + - name: 📤 Upload release assets + uses: alexellis/upload-assets@0.4.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + asset_paths: '["./dist.tar.gz"]' + +... diff --git a/.gitignore b/.gitignore index 485dee6..dc621d0 100755 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea +dist diff --git a/Makefile b/Makefile index 7f6beba..c57fbdc 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ # to decrease build times and increase productivity for free. # https://docs.docker.com/compose/environment-variables/envvars/ export DOCKER_BUILDKIT ?= 1 +export COMPOSE_DOCKER_CLI_BUILD ?= 1 IMAGE_NAMESPACE ?= wayofdev/php-base IMAGE_TEMPLATE ?= 7.4-cli-alpine diff --git a/README.md b/README.md index d4a5f9d..7ade9a7 100644 --- a/README.md +++ b/README.md @@ -31,11 +31,20 @@ Enabled extensions by default: | [pcntl](https://www.php.net/manual/en/book.pcntl.php) | Process control | native | | [sockets](https://www.php.net/manual/en/book.sockets.php) | Socket communication functions | native | | [pdo_pgsql](https://www.php.net/manual/en/ref.pdo-pgsql.php) | PostgreSQL functions | native | +| [pdo_mysql](https://www.php.net/manual/en/ref.pdo-mysql.php) | Mysql functions | native | | [opcache](https://www.php.net/manual/en/book.opcache.php) | Improves PHP performance by storing precompiled script bytecode in shared memory | native | | [zip](https://www.php.net/manual/en/book.zip.php) | Read/write functions for ZIP archives | native | | [bcmath](https://www.php.net/manual/en/book.bc.php) | For arbitrary precision mathematics | native | +| [exif](https://www.php.net/manual/en/book.exif.php) | Exchangeable image information | native | +| [gd](https://www.php.net/manual/en/book.image.php) | Image processing and manipulation library | native | +| [soap](https://www.php.net/manual/en/book.soap.php) | SOAP (Simple Object Access Protocol) functions | native | | [redis](https://pecl.php.net/package/redis) | Functions for interfacing with Redis | pecl | | [decimal](https://pecl.php.net/package/decimal) | Arbitrary precision floating-point decimal | pecl | +| [imagick](https://pecl.php.net/package/imagick) | ImageMagick library for image manipulation | pecl | +| [rdkafka](https://pecl.php.net/package/rdkafka) | Kafka client library for PHP | pecl | +| [amqp](https://pecl.php.net/package/amqp) | Advanced Message Queuing Protocol (AMQP) library | pecl | +| [protobuf](https://pecl.php.net/package/protobuf) | Protocol Buffers serialization format library | pecl | +| [yaml](https://pecl.php.net/package/yaml) | YAML (YAML Ain't Markup Language) library | pecl |
@@ -67,18 +76,32 @@ ext_native_enabled: - intl - pcntl - sockets + - pdo_mysql - pdo_pgsql - OPcache - zip - bcmath + - exif + - gd + - soap ext_pecl_enabled: - redis - decimal + - imagick + - rdkafka + - amqp + - protobuf + - yaml ext_pecl_versions: redis: "5.3.7" decimal: "1.4.0" + imagick: "3.7.0" + rdkafka: "6.0.3" + amqp: "1.11.0" + protobuf: "3.22.5" + yaml: "2.2.3" ```
@@ -129,10 +152,16 @@ Building all images: ```bash $ make build IMAGE_TEMPLATE="7.4-cli-alpine" $ make build IMAGE_TEMPLATE="7.4-fpm-alpine" +$ make build IMAGE_TEMPLATE="7.4-supervisord-alpine" $ make build IMAGE_TEMPLATE="8.0-cli-alpine" $ make build IMAGE_TEMPLATE="8.0-fpm-alpine" +$ make build IMAGE_TEMPLATE="8.0-supervisord-alpine" $ make build IMAGE_TEMPLATE="8.1-cli-alpine" $ make build IMAGE_TEMPLATE="8.1-fpm-alpine" +$ make build IMAGE_TEMPLATE="8.1-supervisord-alpine" +$ make build IMAGE_TEMPLATE="8.2-cli-alpine" +$ make build IMAGE_TEMPLATE="8.2-fpm-alpine" +$ make build IMAGE_TEMPLATE="8.2-supervisord-alpine" ```
@@ -152,10 +181,16 @@ To test all images: ```bash $ make test IMAGE_TEMPLATE="7.4-cli-alpine" $ make test IMAGE_TEMPLATE="7.4-fpm-alpine" +$ make test IMAGE_TEMPLATE="7.4-supervisord-alpine" $ make test IMAGE_TEMPLATE="8.0-cli-alpine" $ make test IMAGE_TEMPLATE="8.0-fpm-alpine" +$ make test IMAGE_TEMPLATE="8.0-supervisord-alpine" $ make test IMAGE_TEMPLATE="8.1-cli-alpine" $ make test IMAGE_TEMPLATE="8.1-fpm-alpine" +$ make test IMAGE_TEMPLATE="8.1-supervisord-alpine" +$ make test IMAGE_TEMPLATE="8.2-cli-alpine" +$ make test IMAGE_TEMPLATE="8.2-fpm-alpine" +$ make test IMAGE_TEMPLATE="8.2-supervisord-alpine" ```
@@ -165,13 +200,19 @@ $ make test IMAGE_TEMPLATE="8.1-fpm-alpine" Run **yamllint** to validate all yaml files in project: ```bash -$ make lint +$ make lint-yaml ``` Run hadolint to validate created Dockerfiles: ```bash -$ make hadolint +$ make lint-docker +``` + +Run ansible-lint to validate ansible project files: + +```bash +$ make lint-ansible ```
diff --git a/dist/base/7.4-cli-alpine/Dockerfile b/dist/base/7.4-cli-alpine/Dockerfile deleted file mode 100644 index 0ca52e8..0000000 --- a/dist/base/7.4-cli-alpine/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:7.4-cli-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="7.4-base" -LABEL "org.opencontainers.image.title"="PHP-CLI 7.4-base" -LABEL "org.opencontainers.image.description"="PHP-CLI 7.4-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/7.4-cli-alpine/configs/opcache.ini b/dist/base/7.4-cli-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/7.4-cli-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/7.4-cli-alpine/configs/php.ini b/dist/base/7.4-cli-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/7.4-cli-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/7.4-cli-alpine/goss.yaml b/dist/base/7.4-cli-alpine/goss.yaml deleted file mode 100644 index ac934eb..0000000 --- a/dist/base/7.4-cli-alpine/goss.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -file: - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 7.4" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/7.4-fpm-alpine/Dockerfile b/dist/base/7.4-fpm-alpine/Dockerfile deleted file mode 100644 index 033facd..0000000 --- a/dist/base/7.4-fpm-alpine/Dockerfile +++ /dev/null @@ -1,80 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:7.4-fpm-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="7.4-base" -LABEL "org.opencontainers.image.title"="PHP-FPM 7.4-base" -LABEL "org.opencontainers.image.description"="PHP-FPM 7.4-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" -ENV PHPFPM_SLOWLOG_TIMEOUT="5s" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/7.4-fpm-alpine/configs/opcache.ini b/dist/base/7.4-fpm-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/7.4-fpm-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/7.4-fpm-alpine/configs/php.ini b/dist/base/7.4-fpm-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/7.4-fpm-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/7.4-fpm-alpine/goss.yaml b/dist/base/7.4-fpm-alpine/goss.yaml deleted file mode 100644 index 2c4364c..0000000 --- a/dist/base/7.4-fpm-alpine/goss.yaml +++ /dev/null @@ -1,65 +0,0 @@ ---- - -file: - /usr/local/etc/php-fpm.conf: - filetype: file - exists: true - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -port: - tcp6:9000: - listening: true - ip: - - '::' -process: - php-fpm: - running: true -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 7.4" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/7.4-supervisord-alpine/Dockerfile b/dist/base/7.4-supervisord-alpine/Dockerfile deleted file mode 100644 index 2d11fdd..0000000 --- a/dist/base/7.4-supervisord-alpine/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:7.4-supervisord-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="7.4-base" -LABEL "org.opencontainers.image.title"="PHP-SUPERVISORD 7.4-base" -LABEL "org.opencontainers.image.description"="PHP-SUPERVISORD 7.4-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/7.4-supervisord-alpine/configs/opcache.ini b/dist/base/7.4-supervisord-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/7.4-supervisord-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/7.4-supervisord-alpine/configs/php.ini b/dist/base/7.4-supervisord-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/7.4-supervisord-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/7.4-supervisord-alpine/goss.yaml b/dist/base/7.4-supervisord-alpine/goss.yaml deleted file mode 100644 index ac934eb..0000000 --- a/dist/base/7.4-supervisord-alpine/goss.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -file: - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 7.4" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.0-cli-alpine/Dockerfile b/dist/base/8.0-cli-alpine/Dockerfile deleted file mode 100644 index 35666ec..0000000 --- a/dist/base/8.0-cli-alpine/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.0-cli-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="8.0-base" -LABEL "org.opencontainers.image.title"="PHP-CLI 8.0-base" -LABEL "org.opencontainers.image.description"="PHP-CLI 8.0-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.0-cli-alpine/configs/opcache.ini b/dist/base/8.0-cli-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.0-cli-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.0-cli-alpine/configs/php.ini b/dist/base/8.0-cli-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.0-cli-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.0-cli-alpine/goss.yaml b/dist/base/8.0-cli-alpine/goss.yaml deleted file mode 100644 index cc59815..0000000 --- a/dist/base/8.0-cli-alpine/goss.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -file: - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.0" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.0-fpm-alpine/Dockerfile b/dist/base/8.0-fpm-alpine/Dockerfile deleted file mode 100644 index 8f0ce3b..0000000 --- a/dist/base/8.0-fpm-alpine/Dockerfile +++ /dev/null @@ -1,80 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.0-fpm-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="8.0-base" -LABEL "org.opencontainers.image.title"="PHP-FPM 8.0-base" -LABEL "org.opencontainers.image.description"="PHP-FPM 8.0-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" -ENV PHPFPM_SLOWLOG_TIMEOUT="5s" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.0-fpm-alpine/configs/opcache.ini b/dist/base/8.0-fpm-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.0-fpm-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.0-fpm-alpine/configs/php.ini b/dist/base/8.0-fpm-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.0-fpm-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.0-fpm-alpine/goss.yaml b/dist/base/8.0-fpm-alpine/goss.yaml deleted file mode 100644 index 0865b44..0000000 --- a/dist/base/8.0-fpm-alpine/goss.yaml +++ /dev/null @@ -1,65 +0,0 @@ ---- - -file: - /usr/local/etc/php-fpm.conf: - filetype: file - exists: true - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -port: - tcp6:9000: - listening: true - ip: - - '::' -process: - php-fpm: - running: true -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.0" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.0-supervisord-alpine/Dockerfile b/dist/base/8.0-supervisord-alpine/Dockerfile deleted file mode 100644 index 6783151..0000000 --- a/dist/base/8.0-supervisord-alpine/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.0-supervisord-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="8.0-base" -LABEL "org.opencontainers.image.title"="PHP-SUPERVISORD 8.0-base" -LABEL "org.opencontainers.image.description"="PHP-SUPERVISORD 8.0-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.0-supervisord-alpine/configs/opcache.ini b/dist/base/8.0-supervisord-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.0-supervisord-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.0-supervisord-alpine/configs/php.ini b/dist/base/8.0-supervisord-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.0-supervisord-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.0-supervisord-alpine/goss.yaml b/dist/base/8.0-supervisord-alpine/goss.yaml deleted file mode 100644 index cc59815..0000000 --- a/dist/base/8.0-supervisord-alpine/goss.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -file: - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.0" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.1-cli-alpine/Dockerfile b/dist/base/8.1-cli-alpine/Dockerfile deleted file mode 100644 index ec1d3fb..0000000 --- a/dist/base/8.1-cli-alpine/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.1-cli-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="8.1-base" -LABEL "org.opencontainers.image.title"="PHP-CLI 8.1-base" -LABEL "org.opencontainers.image.description"="PHP-CLI 8.1-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.1-cli-alpine/configs/opcache.ini b/dist/base/8.1-cli-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.1-cli-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.1-cli-alpine/configs/php.ini b/dist/base/8.1-cli-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.1-cli-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.1-cli-alpine/goss.yaml b/dist/base/8.1-cli-alpine/goss.yaml deleted file mode 100644 index ce86ebe..0000000 --- a/dist/base/8.1-cli-alpine/goss.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -file: - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.1" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.1-fpm-alpine/Dockerfile b/dist/base/8.1-fpm-alpine/Dockerfile deleted file mode 100644 index b0bd58b..0000000 --- a/dist/base/8.1-fpm-alpine/Dockerfile +++ /dev/null @@ -1,80 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.1-fpm-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -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" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" -ENV PHPFPM_SLOWLOG_TIMEOUT="5s" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.1-fpm-alpine/configs/opcache.ini b/dist/base/8.1-fpm-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.1-fpm-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.1-fpm-alpine/configs/php.ini b/dist/base/8.1-fpm-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.1-fpm-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.1-fpm-alpine/goss.yaml b/dist/base/8.1-fpm-alpine/goss.yaml deleted file mode 100644 index a570c13..0000000 --- a/dist/base/8.1-fpm-alpine/goss.yaml +++ /dev/null @@ -1,65 +0,0 @@ ---- - -file: - /usr/local/etc/php-fpm.conf: - filetype: file - exists: true - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -port: - tcp6:9000: - listening: true - ip: - - '::' -process: - php-fpm: - running: true -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.1" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.1-supervisord-alpine/Dockerfile b/dist/base/8.1-supervisord-alpine/Dockerfile deleted file mode 100644 index f929a23..0000000 --- a/dist/base/8.1-supervisord-alpine/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.1-supervisord-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="8.1-base" -LABEL "org.opencontainers.image.title"="PHP-SUPERVISORD 8.1-base" -LABEL "org.opencontainers.image.description"="PHP-SUPERVISORD 8.1-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.1-supervisord-alpine/configs/opcache.ini b/dist/base/8.1-supervisord-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.1-supervisord-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.1-supervisord-alpine/configs/php.ini b/dist/base/8.1-supervisord-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.1-supervisord-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.1-supervisord-alpine/goss.yaml b/dist/base/8.1-supervisord-alpine/goss.yaml deleted file mode 100644 index ce86ebe..0000000 --- a/dist/base/8.1-supervisord-alpine/goss.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -file: - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.1" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.2-cli-alpine/Dockerfile b/dist/base/8.2-cli-alpine/Dockerfile deleted file mode 100644 index 018cbbf..0000000 --- a/dist/base/8.2-cli-alpine/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.2-cli-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="8.2-base" -LABEL "org.opencontainers.image.title"="PHP-CLI 8.2-base" -LABEL "org.opencontainers.image.description"="PHP-CLI 8.2-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.2-cli-alpine/configs/opcache.ini b/dist/base/8.2-cli-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.2-cli-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.2-cli-alpine/configs/php.ini b/dist/base/8.2-cli-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.2-cli-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.2-cli-alpine/goss.yaml b/dist/base/8.2-cli-alpine/goss.yaml deleted file mode 100644 index 07ef92e..0000000 --- a/dist/base/8.2-cli-alpine/goss.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -file: - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.2" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.2-fpm-alpine/Dockerfile b/dist/base/8.2-fpm-alpine/Dockerfile deleted file mode 100644 index 34acf53..0000000 --- a/dist/base/8.2-fpm-alpine/Dockerfile +++ /dev/null @@ -1,80 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.2-fpm-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="8.2-base" -LABEL "org.opencontainers.image.title"="PHP-FPM 8.2-base" -LABEL "org.opencontainers.image.description"="PHP-FPM 8.2-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" -ENV PHPFPM_SLOWLOG_TIMEOUT="5s" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.2-fpm-alpine/configs/opcache.ini b/dist/base/8.2-fpm-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.2-fpm-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.2-fpm-alpine/configs/php.ini b/dist/base/8.2-fpm-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.2-fpm-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.2-fpm-alpine/goss.yaml b/dist/base/8.2-fpm-alpine/goss.yaml deleted file mode 100644 index 7cdcaa4..0000000 --- a/dist/base/8.2-fpm-alpine/goss.yaml +++ /dev/null @@ -1,65 +0,0 @@ ---- - -file: - /usr/local/etc/php-fpm.conf: - filetype: file - exists: true - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -port: - tcp6:9000: - listening: true - ip: - - '::' -process: - php-fpm: - running: true -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.2" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/dist/base/8.2-supervisord-alpine/Dockerfile b/dist/base/8.2-supervisord-alpine/Dockerfile deleted file mode 100644 index 492cd6e..0000000 --- a/dist/base/8.2-supervisord-alpine/Dockerfile +++ /dev/null @@ -1,79 +0,0 @@ -# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead. - -FROM php:8.2-supervisord-alpine - -# Labels -# https://github.com/opencontainers/image-spec/blob/main/annotations.md -LABEL "maintainer"="lotyp " -LABEL "vendor"="wayofdev" -LABEL "org.opencontainers.image.authors"="lotyp " -LABEL "org.opencontainers.image.url"="https://hub.docker.com/r/wayofdev/php-base" -LABEL "org.opencontainers.image.documentation"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.source"="https://github.com/wayofdev/docker-php-base" -LABEL "org.opencontainers.image.vendor"="wayofdev" -LABEL "org.opencontainers.image.licenses"="MIT" -LABEL "org.opencontainers.image.ref.name"="8.2-base" -LABEL "org.opencontainers.image.title"="PHP-SUPERVISORD 8.2-base" -LABEL "org.opencontainers.image.description"="PHP-SUPERVISORD 8.2-base" - -ENV LANG="en_US.UTF-8" -ENV LC_ALL="en_US.UTF-8" -ENV LANGUAGE="en_US.UTF-8" - -ENV PHP_OPCACHE_ENABLE="1" -ENV PHP_OPCACHE_ENABLE_CLI="1" -ENV PHP_TIMEZONE="UTC" -ENV PHP_POST_MAX_SIZE="16M" -ENV PHP_MEMORY_LIMIT="256M" - -RUN set -eux; \ - apk -U upgrade -a \ - # Temporary build dependencies for compiling Pecl extensions - && apk add --no-cache --virtual .temp-build-deps \ - $PHPIZE_DEPS \ - # Intl - Internationalization; "icu-dev" is temporary build dependency - && apk add --no-cache \ - icu-libs \ - icu-dev \ - && docker-php-ext-install -j$(nproc) intl \ - && apk del icu-dev \ - # Pcntl - Process control support - && docker-php-ext-install -j$(nproc) pcntl \ - && docker-php-ext-install -j$(nproc) --ini-name docker-php-ext-00-sockets.ini sockets \ - # MySQL - # Postgres; "postgresql-dev" is temporary build dependency - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-dev \ - && apk add --no-cache -X https://dl-cdn.alpinelinux.org/alpine/3.18/main postgresql-libs \ - && docker-php-ext-install -j$(nproc) pdo_pgsql \ - && apk del postgresql-dev \ - # Opcache - && docker-php-ext-install -j$(nproc) opcache \ - # Zip - && apk add --no-cache \ - libzip \ - libzip-dev zlib-dev \ - && docker-php-ext-install -j$(nproc) zip \ - && apk del libzip-dev zlib-dev \ - # Bz2 - # Bcmath - Arbitrary Precision Mathematics - && docker-php-ext-install -j$(nproc) bcmath \ - #################################################################################################################### - # Pecl Dependencies - # Redis - In-memory data structure store driver; zstd-dev is temporary build dependency - && apk add --no-cache \ - zstd-libs \ - zstd-dev \ - && pecl install redis-5.3.7 \ - && docker-php-ext-enable redis \ - && apk del zstd-dev \ - # Decimal - Correctly-rounded arbitrary precision decimal floating point arithmetic - && apk add --no-cache \ - mpdecimal-dev \ - mpdecimal \ - && pecl install decimal-1.4.0 \ - && docker-php-ext-enable decimal \ - && apk del mpdecimal-dev \ - && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps - -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ diff --git a/dist/base/8.2-supervisord-alpine/configs/opcache.ini b/dist/base/8.2-supervisord-alpine/configs/opcache.ini deleted file mode 100644 index 48f39cb..0000000 --- a/dist/base/8.2-supervisord-alpine/configs/opcache.ini +++ /dev/null @@ -1,8 +0,0 @@ -opcache.enable = ${PHP_OPCACHE_ENABLE} -opcache.enable_cli = ${PHP_OPCACHE_ENABLE_CLI} -opcache.memory_consumption = 256 -opcache.use_cwd = 0 -opcache.max_file_size = 0 -opcache.max_accelerated_files = 30000 -opcache.validate_timestamps = 1 -opcache.revalidate_freq = 0 diff --git a/dist/base/8.2-supervisord-alpine/configs/php.ini b/dist/base/8.2-supervisord-alpine/configs/php.ini deleted file mode 100644 index eae21a1..0000000 --- a/dist/base/8.2-supervisord-alpine/configs/php.ini +++ /dev/null @@ -1,25 +0,0 @@ -; https://www.php.net/manual/en/ini.list.php -[PHP] - -display_errors = Off -log_errors = On - -max_execution_time = 300 -default_socket_timeout = 600 -max_input_time = 120 -; request_terminate_timeout = 600 - -; Maximum amount of memory a script may consume (128MB) -; http://php.net/memory-limit -memory_limit = 256M - -; Maximum allowed size for uploaded files. -; http://php.net/upload-max-filesize -upload_max_filesize = 32M - -; Sets max size of post data allowed. -; http://php.net/post-max-size -post_max_size = 32M - -[Date] -date.timezone = UTC diff --git a/dist/base/8.2-supervisord-alpine/goss.yaml b/dist/base/8.2-supervisord-alpine/goss.yaml deleted file mode 100644 index 07ef92e..0000000 --- a/dist/base/8.2-supervisord-alpine/goss.yaml +++ /dev/null @@ -1,54 +0,0 @@ ---- - -file: - /usr/local/etc/php/conf.d/php.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "date.timezone = UTC" - /usr/local/etc/php/conf.d/opcache.ini: - filetype: file - exists: true - owner: www-data - group: www-data - contains: - - "opcache.memory_consumption = 256" -group: - www-data: - exists: true -user: - www-data: - exists: true - groups: - - www-data -package: - curl: - installed: true -command: - "php -v": - stdout: - - "PHP 8.2" - stderr: - - "!/Unable to load dynamic library/" - exit-status: 0 - "php -m": - stdout: - - bcmath - - decimal - - intl - - OPcache - - pcntl - - pdo_pgsql - - redis - - sockets - - zip - exit-status: 0 - "php --info": - stdout: - - opcache.enable => On => On - - opcache.enable_cli => On => On - exit-status: 0 - -... diff --git a/src/Dockerfiles/base/Dockerfile.j2 b/src/Dockerfiles/base/Dockerfile.j2 index 37dfabc..1582ce0 100644 --- a/src/Dockerfiles/base/Dockerfile.j2 +++ b/src/Dockerfiles/base/Dockerfile.j2 @@ -31,6 +31,10 @@ ENV PHPFPM_SLOWLOG_TIMEOUT="5s" RUN set -eux; \ apk -U upgrade -a \ + # Add production dependencies +{% if 'supervisord' == php_type %} + && apk add --no-cache supervisor \ +{% endif %} # Temporary build dependencies for compiling Pecl extensions && apk add --no-cache --virtual .temp-build-deps \ $PHPIZE_DEPS \ @@ -83,6 +87,27 @@ RUN set -eux; \ # Bcmath - Arbitrary Precision Mathematics {% if 'bcmath' in ext_native_enabled %} && docker-php-ext-install -j$(nproc) bcmath \ +{% endif %} + # Soap Messaging Protocol +{% if 'soap' in ext_native_enabled %} + && apk add --no-cache libxml2-dev \ + && docker-php-ext-install -j$(nproc) soap \ + && apk del libxml2-dev \ +{% endif %} + ### Image Processing + # https://www.php.net/manual/en/refs.utilspec.image.php + # Exif - (Exchangeable image information) / Image Meta Data +{% if 'exif' in ext_native_enabled %} + && docker-php-ext-install -j$(nproc) exif \ +{% endif %} + # GD +{% if 'gd' in ext_native_enabled %} + && apk add --no-cache \ + freetype libjpeg-turbo libpng libxpm libwebp \ + freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev libwebp-dev \ + && docker-php-ext-configure gd --enable-gd --with-webp --with-jpeg --with-xpm --with-freetype \ + && docker-php-ext-install -j$(nproc) gd \ + && apk del freetype-dev libjpeg-turbo-dev libpng-dev libxpm-dev libwebp-dev \ {% endif %} #################################################################################################################### # Pecl Dependencies @@ -103,8 +128,69 @@ RUN set -eux; \ && pecl install decimal-{{ ext_pecl_versions.decimal }} \ && docker-php-ext-enable decimal \ && apk del mpdecimal-dev \ +{% endif %} + # Imagick +{% if 'imagick' in ext_pecl_enabled %} + && apk add --no-cache \ + imagemagick libgomp \ + imagemagick-dev \ + && pecl install imagick-{{ ext_pecl_versions.imagick }} \ + && docker-php-ext-enable imagick \ + && apk del imagemagick-dev \ +{% endif %} + # Client for Apache Kafka +{% if 'rdkafka' in ext_pecl_enabled %} + && apk add --no-cache \ + librdkafka \ + librdkafka-dev \ + && pecl install rdkafka-{{ ext_pecl_versions.rdkafka }} \ + && docker-php-ext-enable rdkafka \ + && apk del librdkafka-dev \ +{% endif %} + # AMQP - Communicate with any amqp compliant server +{% if 'amqp' in ext_pecl_enabled %} + && apk add --no-cache \ + rabbitmq-c \ + rabbitmq-c-dev \ + && pecl install amqp-{{ ext_pecl_versions.amqp }} \ + && docker-php-ext-enable amqp \ + && apk del rabbitmq-c-dev \ +{% endif %} + # Protobuf - Google's extensible mechanism for serializing structured data. + # https://spiral.dev/docs/grpc-configuration#toolkit-installation-install-protobuf-extension-optional +{% if 'protobuf' in ext_pecl_enabled %} + && pecl install protobuf-{{ ext_pecl_versions.protobuf }} \ + && docker-php-ext-enable --ini-name docker-php-ext-10-protobuf.ini protobuf \ +{% endif %} + # Yaml parser and emitter +{% if 'yaml' in ext_pecl_enabled %} + && apk add --no-cache \ + yaml \ + yaml-dev \ + && pecl install yaml-{{ ext_pecl_versions.yaml }} \ + && docker-php-ext-enable yaml \ + && apk del yaml-dev \ {% endif %} && chown -R www-data:www-data /usr/local/etc/php/conf.d/ \ - && apk del -f .temp-build-deps + && apk del -f .temp-build-deps \ + && rm -rf /var/www/html \ + && mkdir /app \ + && chown www-data:www-data /app + +COPY --chown=www-data ./configs/opcache.ini /usr/local/etc/php/conf.d/opcache.ini +COPY --chown=www-data ./configs/php.ini /usr/local/etc/php/conf.d/php.ini + +{% if 'fpm' == php_type %} +COPY ./configs/php-fpm.d/ /usr/local/etc/php-fpm.d/ +{% endif %} +{% if 'supervisord' == php_type %} +COPY --chown=www-data ./configs/supervisord.conf /etc/supervisord.conf +{% endif %} + +WORKDIR /app -COPY --chown=www-data ./configs/ /usr/local/etc/php/conf.d/ +USER www-data + +{% if 'supervisord' == php_type %} +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] +{% endif %} diff --git a/src/Dockerfiles/base/goss.yaml.j2 b/src/Dockerfiles/base/goss.yaml.j2 index 5ca26d4..cd2e57c 100644 --- a/src/Dockerfiles/base/goss.yaml.j2 +++ b/src/Dockerfiles/base/goss.yaml.j2 @@ -5,6 +5,24 @@ file: /usr/local/etc/php-fpm.conf: filetype: file exists: true + /usr/local/etc/php-fpm.d/docker.conf: + filetype: file + exists: true + contains: + - "Custom Config File" + - "log_limit = 8192" + /usr/local/etc/php-fpm.d/zz-docker.conf: + filetype: file + exists: true + contains: + - "Custom Config File" + - "daemonize = no" + /usr/local/etc/php-fpm.d/www.conf: + filetype: file + exists: true + contains: + - "Custom Config File" + - "pm.max_children = 5" {% endif %} /usr/local/etc/php/conf.d/php.ini: filetype: file @@ -30,6 +48,18 @@ process: php-fpm: running: true {% endif %} +{% if 'supervisord' == php_type %} + /etc/supervisord.conf: + filetype: file + exists: true + contains: + - "nodaemon = true" + /tmp/supervisord.pid: + filetype: file + exists: true + contains: + - "1" +{% endif %} group: www-data: exists: true diff --git a/src/Dockerfiles/base/goss_wait.yaml b/src/Dockerfiles/base/goss_wait.yaml new file mode 100644 index 0000000..a5c1fea --- /dev/null +++ b/src/Dockerfiles/base/goss_wait.yaml @@ -0,0 +1,7 @@ +--- + +process: + supervisord: + running: true + +... diff --git a/src/config/php-fpm.d/docker.conf b/src/config/php-fpm.d/docker.conf new file mode 100644 index 0000000..01856ff --- /dev/null +++ b/src/config/php-fpm.d/docker.conf @@ -0,0 +1,17 @@ +; Custom Config File + +[global] +error_log = /proc/self/fd/2 + +; https://github.com/docker-library/php/pull/725#issuecomment-443540114 +log_limit = 8192 + +[www] +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + +clear_env = no + +; Ensure worker stdout and stderr are sent to the main error log. +catch_workers_output = yes +decorate_workers_output = no diff --git a/src/config/php-fpm.d/www.conf b/src/config/php-fpm.d/www.conf new file mode 100644 index 0000000..a154efe --- /dev/null +++ b/src/config/php-fpm.d/www.conf @@ -0,0 +1,76 @@ +; Custom Config File +; +; Start a new pool named 'www'. +; the variable $pool can be used in any directive and will be replaced by the +; pool name ('www' here) +[www] + +; Unix user/group of processes +; Note: The user is mandatory. If the group is not set, the default user's group +; will be used. +user = www-data +group = www-data + +; The address on which to accept FastCGI requests. +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on +; a specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses +; (IPv6 and IPv4-mapped) on a specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Note: This value is mandatory. +listen = 127.0.0.1:9000 + +; Choose how the process manager will control the number of child processes. +; Possible Values: +; static - a fixed number (pm.max_children) of child processes; +; dynamic - the number of child processes are set dynamically based on the +; following directives. With this process management, there will be +; always at least 1 children. +; pm.max_children - the maximum number of children that can +; be alive at the same time. +; pm.start_servers - the number of children created on startup. +; pm.min_spare_servers - the minimum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is less than this +; number then some children will be created. +; pm.max_spare_servers - the maximum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is greater than this +; number then some children will be killed. +; ondemand - no children are created at startup. Children will be forked when +; new requests will connect. The following parameter are used: +; pm.max_children - the maximum number of children that +; can be alive at the same time. +; pm.process_idle_timeout - The number of seconds after which +; an idle process will be killed. +; Note: This value is mandatory. +pm = dynamic + +; The number of child processes to be created when pm is set to 'static' and the +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. +; This value sets the limit on the number of simultaneous requests that will be +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP +; CGI. The below defaults are based on a server without much resources. Don't +; forget to tweak pm.* to fit your needs. +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' +; Note: This value is mandatory. +pm.max_children = 5 + +; The number of child processes created on startup. +; Note: Used only when pm is set to 'dynamic' +; Default Value: (min_spare_servers + max_spare_servers) / 2 +pm.start_servers = 2 + +; The desired minimum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.min_spare_servers = 1 + +; The desired maximum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.max_spare_servers = 3 diff --git a/src/config/php-fpm.d/zz-docker.conf b/src/config/php-fpm.d/zz-docker.conf new file mode 100644 index 0000000..2030d2f --- /dev/null +++ b/src/config/php-fpm.d/zz-docker.conf @@ -0,0 +1,7 @@ +; Custom Config File + +[global] +daemonize = no + +[www] +listen = 9000 diff --git a/src/config/supervisord.conf b/src/config/supervisord.conf new file mode 100644 index 0000000..8f6d87a --- /dev/null +++ b/src/config/supervisord.conf @@ -0,0 +1,20 @@ +[supervisord] +nodaemon = true +user = www-data +logfile = /dev/null +pidfile = /tmp/supervisord.pid + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[unix_http_server] +file = /tmp/supervisor.sock + +[inet_http_server] +port = *:9001 + +[supervisorctl] +serverurl = unix:///tmp/supervisor.sock + +[include] +files = /etc/supervisor/conf.d/*.conf diff --git a/src/group_vars/base.yml b/src/group_vars/base.yml index 303f290..3c0e55d 100644 --- a/src/group_vars/base.yml +++ b/src/group_vars/base.yml @@ -1,12 +1,12 @@ --- # Ansible specific definitions -######################################################################################################################## +####################################### edit_comment_base: "# Auto-generated via Ansible: edit src/Dockerfiles/base/Dockerfile.j2 instead." # Configuration Settings -######################################################################################################################## +####################################### settings_opcache_ini: php_opcache_enable: 1 php_opcache_enable_cli: 1 @@ -18,7 +18,7 @@ settings_php_ini: # Base dist directories -######################################################################################################################## +####################################### tpl_directories: # For "base" create only fpm and cli versions - path: "../dist/base/{{ php_version }}-{{ php_type }}-{{ os_name }}/" @@ -27,16 +27,20 @@ tpl_config_directories: # Additionally, configs directory - path: "../dist/base/{{ php_version }}-{{ php_type }}-{{ os_name }}/configs/" +tpl_fpm_config_directories: + # Additionally, for "prod", create "php-fpm.d" directory + - path: "../dist/base/{{ php_version }}-fpm-{{ os_name }}/configs/php-fpm.d/" + # Dockerfile paths for cli and fpm Dockerfiles -######################################################################################################################## +####################################### tpl_dockerfiles: - src: Dockerfiles/base/Dockerfile.j2 dst: "../dist/base/{{ php_version }}-{{ php_type }}-{{ os_name }}/Dockerfile" # Additional configuration files -######################################################################################################################## +####################################### tpl_configs: # php.ini - src: config/base/php.ini.j2 @@ -45,33 +49,62 @@ tpl_configs: - src: config/base/opcache.ini.j2 dst: "../dist/base/{{ php_version }}-{{ php_type }}-{{ os_name }}/configs/opcache.ini" +tpl_fpm_configs: + # php-fpm.d/docker.conf + - src: config/php-fpm.d/docker.conf + dst: "../dist/base/{{ php_version }}-fpm-{{ os_name }}/configs/php-fpm.d/docker.conf" + # php-fpm.d/www.conf + - src: config/php-fpm.d/www.conf + dst: "../dist/base/{{ php_version }}-fpm-{{ os_name }}/configs/php-fpm.d/www.conf" + # php-fpm.d/zz-docker.conf + - src: config/php-fpm.d/zz-docker.conf + dst: "../dist/base/{{ php_version }}-fpm-{{ os_name }}/configs/php-fpm.d/zz-docker.conf" + +tpl_supervisord_configs: + # supervisord.conf + - src: config/supervisord.conf + dst: "../dist/base/{{ php_version }}-supervisord-{{ os_name }}/configs/supervisord.conf" + # Dgoss tests -######################################################################################################################## +####################################### tpl_docker_tests: - src: Dockerfiles/base/goss.yaml.j2 dst: "../dist/base/{{ php_version }}-{{ php_type }}-{{ os_name }}/goss.yaml" - + - src: Dockerfiles/base/goss_wait.yaml + dst: "../dist/base/{{ php_version }}-supervisord-{{ os_name }}/goss_wait.yaml" # Enabled extensions -######################################################################################################################## +####################################### ext_native_enabled: - intl - pcntl - sockets - # - pdo_mysql + - pdo_mysql - pdo_pgsql - OPcache - zip - # - bz2 - bcmath + - exif + - gd + - soap ext_pecl_enabled: - redis - decimal + - imagick + - rdkafka + - amqp + - protobuf + - yaml ext_pecl_versions: redis: "5.3.7" decimal: "1.4.0" + imagick: "3.7.0" + rdkafka: "6.0.3" + amqp: "1.11.0" + protobuf: "3.22.5" + yaml: "2.2.3" ... diff --git a/src/roles/base/main.yml b/src/roles/base/main.yml index d0be654..667e3fc 100644 --- a/src/roles/base/main.yml +++ b/src/roles/base/main.yml @@ -18,6 +18,15 @@ with_items: - "{{ tpl_config_directories }}" +- name: Create fpm config directories + ansible.builtin.file: + path: "{{ item.path }}" + state: directory + mode: "0775" + recurse: true + with_items: + - "{{ tpl_fpm_config_directories }}" + - name: Generate Dockerfiles ansible.builtin.template: src: "{{ item.src }}" @@ -36,6 +45,26 @@ with_items: - "{{ tpl_configs }}" +- name: Generate PHP configuration files for FPM builds + when: php_type == "fpm" + ansible.builtin.template: + src: "{{ item.src }}" + dest: "{{ item.dst }}" + force: true + mode: 0644 + with_items: + - "{{ tpl_fpm_configs }}" + +- name: Generate PHP configuration files for Supervisord builds + when: php_type == "supervisord" + ansible.builtin.template: + src: "{{ item.src }}" + dest: "{{ item.dst }}" + force: true + mode: 0644 + with_items: + - "{{ tpl_supervisord_configs }}" + - name: Generate Dockerfile Goss tests ansible.builtin.template: src: "{{ item.src }}"