Skip to content

Repository files navigation

RequireCloud FrankenPHP Docker images

Opinionated Docker images based on FrankenPHP (repo).

Setup is based on dunglas/symfony-docker.

Variants

ImageTagFrankenPHPPHP
ghcr.io/requirecloud/frankenphp1.12.7-php8.41.12.78.4.24
ghcr.io/requirecloud/frankenphp1.12.7-php8.4.241.12.78.4.24
ghcr.io/requirecloud/frankenphp1.12.7-php81.12.78.5.9
ghcr.io/requirecloud/frankenphp1.12.7-php8.51.12.78.5.9
ghcr.io/requirecloud/frankenphp1.12.7-php8.5.91.12.78.5.9
ghcr.io/requirecloud/frankenphplatest1.12.78.5.9

All tags are released with linux/amd64 and linux/arm64 architecture.

Extensions added

These are the extensions added with install-php-extensions

  • @composer
  • apcu
  • intl
  • opcache
  • zip

Example usage

In your Dockerfile it could be used e.g. like this:

#syntax=docker/dockerfile:1FROM ghcr.io/requirecloud/frankenphp:1.12.7-php8.5 AS frankenphp_base
# Install additional extensionsRUN apt-get update && \
apt-get install -y --no-install-recommends default-mysql-client && \
install-php-extensions \
pdo_mysql \
gd \
redis
ENV PATH="/app/vendor/bin:${PATH}"# Development imageFROM frankenphp_base AS frankenphp_dev
RUN mv "$PHP_INI_DIR/php.ini-development""$PHP_INI_DIR/php.ini"RUN install-php-extensions xdebug
CMD [ "frankenphp", "run", "--config", "/etc/frankenphp/Caddyfile", "--watch" ]
# Production imageFROM frankenphp_base AS frankenphp_prod
ENV APP_ENV=prod
ENV FRANKENPHP_CONFIG="import worker.Caddyfile"RUN mv "$PHP_INI_DIR/php.ini-production""$PHP_INI_DIR/php.ini"# prevent the reinstallation of vendors at every changes in the source codeCOPY --link composer.* ./
RUN set -eux; \
composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress
# copy sourcesCOPY --link . ./
RUN rm -Rf frankenphp/ patches/
RUN set -eux; \
mkdir -p var/cache var/log; \
composer dump-autoload --classmap-authoritative --no-dev; \
composer run-script --no-dev post-install-cmd; \
sync;

TODO and Questions

  • Add build and push workflow in GHA
  • App specific Caddyfiles e.g. Drupal
  • Should Vulcain be removed?
  • Should mysql and postgresql be included?

About

FrankenPHP Docker images

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Packages

Contributors

Languages