Skip to content

Commit

Permalink
Merge branch 'release/1.2.25'
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 10, 2025
2 parents 035699b + 18f6dfb commit 00e147e
Show file tree
Hide file tree
Showing 38 changed files with 633 additions and 177 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-and-push-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["14", "16", "18", "20"]
node: ["16", "18", "20", "22"]
name: node-dev-base ${{ matrix.node }} images
steps:
- name: Check out the repository
Expand All @@ -25,7 +25,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build nystudio107/node-dev-base:${{ matrix.node }}-alpine
- name: Build nystudio107/node-dev-base:node-${{ matrix.node }}-alpine
uses: docker/build-push-action@v2
with:
context: node-dev-base/node-${{ matrix.node }}-alpine
Expand All @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: ["7.4", "8.0", "8.1", "8.2"]
php: ["8.0", "8.1", "8.2", "8.3", "8.4"]
name: php-dev-base ${{ matrix.php }} images
steps:
- name: Check out the repository
Expand All @@ -56,7 +56,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build nystudio107/php-prod-base:${{ matrix.php }}-alpine
- name: Build nystudio107/php-prod-base:php-${{ matrix.php }}-alpine
uses: docker/build-push-action@v2
with:
context: php-prod-base/php-${{ matrix.php }}-alpine
Expand All @@ -66,7 +66,7 @@ jobs:
tags: nystudio107/php-prod-base:${{ matrix.php }}-alpine
build-args: |
PHP_VERSION=${{ matrix.php }}
- name: Build nystudio107/php-dev-base:${{ matrix.php }}-alpine
- name: Build nystudio107/php-dev-base:php-${{ matrix.php }}-alpine
uses: docker/build-push-action@v2
with:
context: php-dev-base/php-${{ matrix.php }}-alpine
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: true
matrix:
node: ["14", "16", "18", "20"]
node: ["16", "18", "20", "22"]
name: node-dev-base ${{ matrix.node }} images
steps:
- name: Check out the repository
Expand All @@ -26,7 +26,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build nystudio107/node-dev-base:${{ matrix.node }}-alpine
- name: Build nystudio107/node-dev-base:node-${{ matrix.node }}-alpine
uses: docker/build-push-action@v2
with:
context: node-dev-base/node-${{ matrix.node }}-alpine
Expand All @@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: ["7.4", "8.0", "8.1", "8.2"]
php: ["8.0", "8.1", "8.2", "8.3", "8.4"]
name: php-dev-base ${{ matrix.php }} images
steps:
- name: Check out the repository
Expand All @@ -57,7 +57,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build nystudio107/php-prod-base:${{ matrix.php }}-alpine
- name: Build nystudio107/php-prod-base:php-${{ matrix.php }}-alpine
uses: docker/build-push-action@v2
with:
context: php-prod-base/php-${{ matrix.php }}-alpine
Expand All @@ -67,7 +67,7 @@ jobs:
tags: nystudio107/php-prod-base:${{ matrix.php }}-alpine
build-args: |
PHP_VERSION=${{ matrix.php }}
- name: Build nystudio107/php-dev-base:${{ matrix.php }}-alpine
- name: Build nystudio107/php-dev-base:php-${{ matrix.php }}-alpine
uses: docker/build-push-action@v2
with:
context: php-dev-base/php-${{ matrix.php }}-alpine
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# nystudio107/docker-images Change Log

## 1.2.25 - 2025.01.10
### Added
* Added a `Makefile` for local building of the images
* Add `node-22-alpine` image
* Add `php-prod-base:8.3-alpine` image
* Add `php-dev-base:8.3-alpine` image
* Add `php-prod-base:8.4-alpine` image
* Add `php-dev-base:8.4-alpine` image

### Changed
* Remove `ENV PHPIZE_DEPS`, and use the environment variable inherited from the parent Alpine images rather than manually setting it ourselves

## 1.2.24 - 2023.11.26
### Changed
* Removed `libressl` in favor of `openssl` to allow Postgres to work
Expand Down
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
BUILDER_NAME?=craft-builder
BUILD_PLATFORM?=linux/$(shell arch)
BUILD_COMMAND?=docker buildx build --load --platform ${BUILD_PLATFORM} --builder ${BUILDER_NAME}
IMAGE_NAMESPACE?=nystudio107
PHP_PROD_NAMESPACE?=php-prod-base
PHP_DEV_NAMESPACE?=php-dev-base
NODE_NAMESPACE?=node-dev-base

PHP_VERSIONS?=php-7.4-alpine php-8.0-alpine php-8.1-alpine php-8.2-alpine php-8.3-alpine php-8.4-alpine
NODE_VERSIONS?=node-14-alpine node-16-alpine node-18-alpine node-20-alpine node-22-alpine

.PHONY: all create-builder php $(PHP_VERSIONS) node $(NODE_VERSIONS)

# Build all base images
all: php node

# Ensure a builder exists for docker buildx
create-builder:
-@if [ ! "$$(docker buildx inspect ${BUILDER_NAME} 2>/dev/null)" ]; then \
echo "No builder exists, creating builder: ${BUILDER_NAME}" ; \
docker buildx create --name ${BUILDER_NAME} ; \
fi

# Build all php base images
php:$(PHP_VERSIONS)

# Build specific php prod & dev base images
$(PHP_VERSIONS):create-builder
${BUILD_COMMAND} -t ${IMAGE_NAMESPACE}/${PHP_PROD_NAMESPACE}:$(subst php-,,$@) ${PHP_PROD_NAMESPACE}/$@
${BUILD_COMMAND} -t ${IMAGE_NAMESPACE}/${PHP_DEV_NAMESPACE}:$(subst php-,,$@) ${PHP_DEV_NAMESPACE}/$@

# Build all node base images
node:$(NODE_VERSIONS)

# Build specific node base images
$(NODE_VERSIONS):create-builder
${BUILD_COMMAND} -t ${IMAGE_NAMESPACE}/${NODE_NAMESPACE}:$(subst node-,,$@) ${NODE_NAMESPACE}/$@
52 changes: 52 additions & 0 deletions node-dev-base/node-22-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM node:22-alpine

# Install packages for headless chrome
RUN apk update \
&& \
apk add --no-cache nmap \
&& \
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories \
&& \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories \
&& \
apk update \
&& \
apk add --no-cache \
# Packages needed for npm install of mozjpeg & cwebp, can't --virtual and apk del later
# Pre-builts do not work on alpine for either:
# ref: https://github.com/imagemin/imagemin/issues/168
# ref: https://github.com/imagemin/cwebp-bin/issues/27
autoconf \
automake \
build-base \
g++ \
gcc \
glu \
libc6-compat \
libtool \
libpng-dev \
libxxf86vm \
make \
nasm \
# Misc packages
nano \
# Image optimization packages
gifsicle \
jpegoptim \
libpng-dev \
libwebp-tools \
libjpeg-turbo-dev \
libjpeg-turbo-utils \
optipng \
pngquant \
# Headless Chrome packages
chromium \
harfbuzz \
"freetype>2.8" \
ttf-freefont \
nss

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV CHROME_BIN /usr/bin/chromium-browser
ENV LIGHTHOUSE_CHROMIUM_PATH /usr/bin/chromium-browser
21 changes: 11 additions & 10 deletions php-dev-base/php-7.4-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM nystudio107/php-prod-base:7.4-alpine

# dependencies required for running "phpize"
# these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
ENV PHPIZE_DEPS \
# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
# Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image
# These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
$PHPIZE_DEPS \
# Build deps
autoconf \
dpkg-dev \
dpkg \
Expand All @@ -13,13 +18,9 @@ ENV PHPIZE_DEPS \
make \
pkgconf \
re2c \
wget

# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
libtool \
linux-headers \
wget \
&& \
# pecl PHP extensions
pecl install \
Expand Down
21 changes: 11 additions & 10 deletions php-dev-base/php-8.0-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
FROM nystudio107/php-prod-base:8.0-alpine

# dependencies required for running "phpize"
# these get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
ENV PHPIZE_DEPS \
# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
# Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image
# These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
$PHPIZE_DEPS \
# Build deps
autoconf \
dpkg-dev \
dpkg \
Expand All @@ -13,13 +18,9 @@ ENV PHPIZE_DEPS \
make \
pkgconf \
re2c \
wget

# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
libtool \
linux-headers \
wget \
&& \
# pecl PHP extensions
pecl install \
Expand Down
2 changes: 1 addition & 1 deletion php-dev-base/php-8.0-alpine/xdebug.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
xdebug.mode=develop,debug,profile
xdebug.mode=develop,debug,profile,coverage
xdebug.start_with_request=trigger
xdebug.client_host=host.docker.internal
xdebug.output_dir = "/var/www/project/cms/storage/logs"
19 changes: 9 additions & 10 deletions php-dev-base/php-8.1-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
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 \
# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
# Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image
# These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
$PHPIZE_DEPS \
# Build deps
autoconf \
dpkg-dev \
dpkg \
Expand All @@ -15,13 +20,7 @@ ENV PHPIZE_DEPS \
re2c \
libtool \
linux-headers \
wget

# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
wget \
&& \
# pecl PHP extensions
pecl install \
Expand Down
2 changes: 1 addition & 1 deletion php-dev-base/php-8.1-alpine/xdebug.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
xdebug.mode=develop,debug,profile
xdebug.mode=develop,debug,profile,coverage
xdebug.start_with_request=trigger
xdebug.client_host=host.docker.internal
xdebug.output_dir = "/var/www/project/cms/storage/logs"
19 changes: 9 additions & 10 deletions php-dev-base/php-8.2-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
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 \
# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
# Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image
# These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
$PHPIZE_DEPS \
# Build deps
autoconf \
dpkg-dev \
dpkg \
Expand All @@ -15,13 +20,7 @@ ENV PHPIZE_DEPS \
re2c \
libtool \
linux-headers \
wget

# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
wget \
&& \
# pecl PHP extensions
pecl install \
Expand Down
2 changes: 1 addition & 1 deletion php-dev-base/php-8.2-alpine/xdebug.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
xdebug.mode=develop,debug,profile
xdebug.mode=develop,debug,profile,coverage
xdebug.start_with_request=trigger
xdebug.client_host=host.docker.internal
xdebug.output_dir = "/var/www/project/cms/storage/logs"
46 changes: 46 additions & 0 deletions php-dev-base/php-8.3-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM nystudio107/php-prod-base:8.3-alpine

# Install packages
RUN set -eux; \
# Packages needed only for build
apk add --no-cache --virtual .build-deps \
# Dependencies required for running "phpize"; the $PHPIZE_DEPS env var is inherited from the parent image
# These get automatically installed and removed by "docker-php-ext-*" (unless they're already installed)
$PHPIZE_DEPS \
# Build deps
autoconf \
dpkg-dev \
dpkg \
file \
g++ \
gcc \
libc-dev \
make \
pkgconf \
re2c \
libtool \
linux-headers \
wget \
&& \
# 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/
Loading

0 comments on commit 00e147e

Please sign in to comment.