diff --git a/.github/workflows/build-and-push-docker-images.yml b/.github/workflows/build-and-push-docker-images.yml index af362ad..811c308 100644 --- a/.github/workflows/build-and-push-docker-images.yml +++ b/.github/workflows/build-and-push-docker-images.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ["12", "14", "16"] + node: ["12", "14", "16", "18"] name: node-dev-base ${{ matrix.node }} images steps: - name: Check out the repository @@ -40,7 +40,7 @@ jobs: strategy: fail-fast: true matrix: - php: ["7.4", "8.0"] + php: ["7.4", "8.0", "8.1", "8.2"] name: php-dev-base ${{ matrix.php }} images steps: - name: Check out the repository diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 6467089..899f149 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: true matrix: - node: ["12", "14", "16"] + node: ["12", "14", "16", "18"] name: node-dev-base ${{ matrix.node }} images steps: - name: Check out the repository @@ -41,7 +41,7 @@ jobs: strategy: fail-fast: true matrix: - php: ["7.4", "8.0"] + php: ["7.4", "8.0", "8.1", "8.2"] name: php-dev-base ${{ matrix.php }} images steps: - name: Check out the repository diff --git a/CHANGELOG.md b/CHANGELOG.md index f636464..9f6a918 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # nystudio107/docker-images Change Log +## 1.2.21 - 2023.07.19 +### Added +* Add `node-18-alpine` image +* Add `php-prod-base:8.1-alpine` image +* Add `php-dev-base:8.1-alpine` image +* Add `php-prod-base:8.2-alpine` image +* Add `php-dev-base:8.2-alpine` image + ## 1.2.20 - 2021.11.24 ### Added * Add `node-16-alpine` image diff --git a/php-dev-base/php-8.1-alpine/Dockerfile b/php-dev-base/php-8.1-alpine/Dockerfile new file mode 100755 index 0000000..35f0ebb --- /dev/null +++ b/php-dev-base/php-8.1-alpine/Dockerfile @@ -0,0 +1,46 @@ +FROM nystudio107/php-prod-base:8.1-alpine + +# dependencies required for running "phpize" +# these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) +ENV PHPIZE_DEPS \ + autoconf \ + dpkg-dev \ + dpkg \ + file \ + g++ \ + gcc \ + libc-dev \ + make \ + pkgconf \ + re2c \ + linux-headers \ + wget + +# Install packages +RUN set -eux; \ + # Packages needed only for build + apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + && \ + # pecl PHP extensions + pecl install \ + xdebug \ + && \ + # Enable PHP extensions + docker-php-ext-enable \ + xdebug \ + && \ + # Remove the build deps + apk del .build-deps \ + && \ + # Clean out directories that don't need to be part of the image + rm -rf /tmp/* /var/tmp/* + +# Copy the `xdebug.ini` file into place for xdebug +COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini + +# Copy the `zzz-docker-php.ini` file into place for php +COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ + +# Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm +COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ diff --git a/php-dev-base/php-8.1-alpine/xdebug.ini b/php-dev-base/php-8.1-alpine/xdebug.ini new file mode 100644 index 0000000..3341bd7 --- /dev/null +++ b/php-dev-base/php-8.1-alpine/xdebug.ini @@ -0,0 +1,4 @@ +xdebug.mode=develop,debug,profile +xdebug.start_with_request=trigger +xdebug.client_host=host.docker.internal +xdebug.output_dir = "/var/www/project/cms/storage/logs" diff --git a/php-dev-base/php-8.1-alpine/zzz-docker-php-fpm.conf b/php-dev-base/php-8.1-alpine/zzz-docker-php-fpm.conf new file mode 100755 index 0000000..b01e39a --- /dev/null +++ b/php-dev-base/php-8.1-alpine/zzz-docker-php-fpm.conf @@ -0,0 +1,4 @@ +[www] +pm.max_children = 5 +pm.process_idle_timeout = 30s +pm.max_requests = 1000 diff --git a/php-dev-base/php-8.1-alpine/zzz-docker-php.ini b/php-dev-base/php-8.1-alpine/zzz-docker-php.ini new file mode 100644 index 0000000..5475fae --- /dev/null +++ b/php-dev-base/php-8.1-alpine/zzz-docker-php.ini @@ -0,0 +1,9 @@ +[php] +memory_limit=256M +max_execution_time=300 +max_input_time=300 +max_input_vars=5000 +upload_max_filesize=100M +post_max_size=100M +[opcache] +opcache.enable=0 diff --git a/php-dev-base/php-8.2-alpine/Dockerfile b/php-dev-base/php-8.2-alpine/Dockerfile new file mode 100755 index 0000000..a4c11a1 --- /dev/null +++ b/php-dev-base/php-8.2-alpine/Dockerfile @@ -0,0 +1,46 @@ +FROM nystudio107/php-prod-base:8.2-alpine + +# dependencies required for running "phpize" +# these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) +ENV PHPIZE_DEPS \ + autoconf \ + dpkg-dev \ + dpkg \ + file \ + g++ \ + gcc \ + libc-dev \ + make \ + pkgconf \ + re2c \ + linux-headers \ + wget + +# Install packages +RUN set -eux; \ + # Packages needed only for build + apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + && \ + # pecl PHP extensions + pecl install \ + xdebug \ + && \ + # Enable PHP extensions + docker-php-ext-enable \ + xdebug \ + && \ + # Remove the build deps + apk del .build-deps \ + && \ + # Clean out directories that don't need to be part of the image + rm -rf /tmp/* /var/tmp/* + +# Copy the `xdebug.ini` file into place for xdebug +COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini + +# Copy the `zzz-docker-php.ini` file into place for php +COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ + +# Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm +COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ diff --git a/php-dev-base/php-8.2-alpine/xdebug.ini b/php-dev-base/php-8.2-alpine/xdebug.ini new file mode 100644 index 0000000..3341bd7 --- /dev/null +++ b/php-dev-base/php-8.2-alpine/xdebug.ini @@ -0,0 +1,4 @@ +xdebug.mode=develop,debug,profile +xdebug.start_with_request=trigger +xdebug.client_host=host.docker.internal +xdebug.output_dir = "/var/www/project/cms/storage/logs" diff --git a/php-dev-base/php-8.2-alpine/zzz-docker-php-fpm.conf b/php-dev-base/php-8.2-alpine/zzz-docker-php-fpm.conf new file mode 100755 index 0000000..b01e39a --- /dev/null +++ b/php-dev-base/php-8.2-alpine/zzz-docker-php-fpm.conf @@ -0,0 +1,4 @@ +[www] +pm.max_children = 5 +pm.process_idle_timeout = 30s +pm.max_requests = 1000 diff --git a/php-dev-base/php-8.2-alpine/zzz-docker-php.ini b/php-dev-base/php-8.2-alpine/zzz-docker-php.ini new file mode 100644 index 0000000..5475fae --- /dev/null +++ b/php-dev-base/php-8.2-alpine/zzz-docker-php.ini @@ -0,0 +1,9 @@ +[php] +memory_limit=256M +max_execution_time=300 +max_input_time=300 +max_input_vars=5000 +upload_max_filesize=100M +post_max_size=100M +[opcache] +opcache.enable=0 diff --git a/php-prod-base/php-8.1-alpine/Dockerfile b/php-prod-base/php-8.1-alpine/Dockerfile new file mode 100755 index 0000000..e145d22 --- /dev/null +++ b/php-prod-base/php-8.1-alpine/Dockerfile @@ -0,0 +1,94 @@ +FROM php:8.1-fpm-alpine3.17 + +# dependencies required for running "phpize" +# these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) +ENV PHPIZE_DEPS \ + autoconf \ + dpkg-dev \ + dpkg \ + file \ + g++ \ + gcc \ + libc-dev \ + make \ + pkgconf \ + re2c \ + zlib-dev \ + wget + +# Install packages +RUN set -eux; \ + # Packages needed only for build + apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + && \ + # Packages to install + apk add --no-cache \ + bzip2-dev \ + ca-certificates \ + curl \ + fcgi \ + freetype-dev \ + gettext-dev \ + icu-dev \ + icu-data-full \ + imagemagick-dev \ + jpeg-dev \ + libpng-dev \ + libwebp-dev \ + libzip-dev \ + libmcrypt-dev \ + libressl-dev \ + libtool \ + libxml2-dev \ + libzip-dev \ + oniguruma-dev \ + unzip \ + && \ + # pecl PHP extensions + pecl install \ + redis \ + && \ + # Configure PHP extensions + docker-php-ext-configure \ + # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 + gd --enable-gd --with-freetype --with-jpeg --with-webp \ + && \ + pecl install \ + imagick \ + && \ + # Install PHP extensions + docker-php-ext-install -j$(nproc) \ + bcmath \ + bz2 \ + exif \ + ftp \ + gettext \ + gd \ + intl \ + mbstring \ + opcache \ + pdo \ + shmop \ + sockets \ + sysvmsg \ + sysvsem \ + sysvshm \ + zip \ + && \ + # Enable PHP extensions + docker-php-ext-enable \ + imagick \ + redis \ + && \ + # Remove the build deps + apk del .build-deps \ + && \ + # Clean out directories that don't need to be part of the image + rm -rf /tmp/* /var/tmp/* + +# Copy the `zzz-docker-php.ini` file into place for php +COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ + +# Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm +COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ diff --git a/php-prod-base/php-8.1-alpine/zzz-docker-php-fpm.conf b/php-prod-base/php-8.1-alpine/zzz-docker-php-fpm.conf new file mode 100755 index 0000000..657bd7b --- /dev/null +++ b/php-prod-base/php-8.1-alpine/zzz-docker-php-fpm.conf @@ -0,0 +1,4 @@ +[www] +pm.max_children = 10 +pm.process_idle_timeout = 30s +pm.max_requests = 1000 diff --git a/php-prod-base/php-8.1-alpine/zzz-docker-php.ini b/php-prod-base/php-8.1-alpine/zzz-docker-php.ini new file mode 100644 index 0000000..6c9eef3 --- /dev/null +++ b/php-prod-base/php-8.1-alpine/zzz-docker-php.ini @@ -0,0 +1,13 @@ +[php] +memory_limit=256M +max_execution_time=300 +max_input_time=300 +max_input_vars=5000 +upload_max_filesize=100M +post_max_size=100M +[opcache] +opcache.enable=1 +opcache.revalidate_freq=0 +opcache.validate_timestamps=1 +opcache.jit_buffer_size=100M +opcache.jit=tracing diff --git a/php-prod-base/php-8.2-alpine/Dockerfile b/php-prod-base/php-8.2-alpine/Dockerfile new file mode 100755 index 0000000..8c46fc2 --- /dev/null +++ b/php-prod-base/php-8.2-alpine/Dockerfile @@ -0,0 +1,94 @@ +FROM php:8.2-fpm-alpine3.17 + +# dependencies required for running "phpize" +# these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed) +ENV PHPIZE_DEPS \ + autoconf \ + dpkg-dev \ + dpkg \ + file \ + g++ \ + gcc \ + libc-dev \ + make \ + pkgconf \ + re2c \ + zlib-dev \ + wget + +# Install packages +RUN set -eux; \ + # Packages needed only for build + apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + && \ + # Packages to install + apk add --no-cache \ + bzip2-dev \ + ca-certificates \ + curl \ + fcgi \ + freetype-dev \ + gettext-dev \ + icu-dev \ + icu-data-full \ + imagemagick-dev \ + jpeg-dev \ + libpng-dev \ + libwebp-dev \ + libzip-dev \ + libmcrypt-dev \ + libressl-dev \ + libtool \ + libxml2-dev \ + libzip-dev \ + oniguruma-dev \ + unzip \ + && \ + # pecl PHP extensions + pecl install \ + redis \ + && \ + # Configure PHP extensions + docker-php-ext-configure \ + # ref: https://github.com/docker-library/php/issues/920#issuecomment-562864296 + gd --enable-gd --with-freetype --with-jpeg --with-webp \ + && \ + pecl install \ + imagick \ + && \ + # Install PHP extensions + docker-php-ext-install -j$(nproc) \ + bcmath \ + bz2 \ + exif \ + ftp \ + gettext \ + gd \ + intl \ + mbstring \ + opcache \ + pdo \ + shmop \ + sockets \ + sysvmsg \ + sysvsem \ + sysvshm \ + zip \ + && \ + # Enable PHP extensions + docker-php-ext-enable \ + imagick \ + redis \ + && \ + # Remove the build deps + apk del .build-deps \ + && \ + # Clean out directories that don't need to be part of the image + rm -rf /tmp/* /var/tmp/* + +# Copy the `zzz-docker-php.ini` file into place for php +COPY zzz-docker-php.ini /usr/local/etc/php/conf.d/ + +# Copy the `zzz-docker-php-fpm.conf` file into place for php-fpm +COPY zzz-docker-php-fpm.conf /usr/local/etc/php-fpm.d/ diff --git a/php-prod-base/php-8.2-alpine/zzz-docker-php-fpm.conf b/php-prod-base/php-8.2-alpine/zzz-docker-php-fpm.conf new file mode 100755 index 0000000..657bd7b --- /dev/null +++ b/php-prod-base/php-8.2-alpine/zzz-docker-php-fpm.conf @@ -0,0 +1,4 @@ +[www] +pm.max_children = 10 +pm.process_idle_timeout = 30s +pm.max_requests = 1000 diff --git a/php-prod-base/php-8.2-alpine/zzz-docker-php.ini b/php-prod-base/php-8.2-alpine/zzz-docker-php.ini new file mode 100644 index 0000000..6c9eef3 --- /dev/null +++ b/php-prod-base/php-8.2-alpine/zzz-docker-php.ini @@ -0,0 +1,13 @@ +[php] +memory_limit=256M +max_execution_time=300 +max_input_time=300 +max_input_vars=5000 +upload_max_filesize=100M +post_max_size=100M +[opcache] +opcache.enable=1 +opcache.revalidate_freq=0 +opcache.validate_timestamps=1 +opcache.jit_buffer_size=100M +opcache.jit=tracing