Skip to content
TrucksNLPublic

About

Docker image for PHP-FPM with our most-used PHP extensions (Mongo, Mysql, Opcache, Redis)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

87 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrucksNL PHP-FPM container image

Docker Image CI

Image variants

Every PHP/Alpine combination is published in two variants. Both run as www-data by default.

Tag Contents Use for
8.4-alpine3.24 PHP-FPM, extensions, healthcheck Final runtime images
8.4-alpine3.24-build Runtime plus git, openssh, Composer and pinned Bitbucket host keys Build stages, e.g. composer install with VCS dependencies

The same suffix applies to the -v<run> and -alpine-latest tags, e.g. 8.4-alpine-latest-build.

Example multi-stage build:

FROM ghcr.io/trucksnl/php-fpm:8.4-alpine-latest-build AS vendor
COPY composer.* ./
RUN --mount=type=ssh composer install --no-dev

FROM ghcr.io/trucksnl/php-fpm:8.4-alpine-latest
COPY --from=vendor --chown=www-data:www-data /var/www/html/vendor ./vendor
COPY . .

The images run as www-data. Switch to root where needed (e.g. install-php-extensions), then switch back:

USER root
RUN install-php-extensions xsl
USER www-data

PHP extensions

Bundled extensions (bcmath, exif, gd, intl, mysqli, opcache, pcntl, pdo_mysql, sysvsem, zip) are installed with install-php-extensions.

excimer (required for Sentry profiling), redis and mongodb are installed with PIE at pinned versions, so builds do not depend on pecl.php.net.

About

Docker image for PHP-FPM with our most-used PHP extensions (Mongo, Mysql, Opcache, Redis)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

Used by

Contributors

Languages