Opinionated Docker images based on FrankenPHP (repo).
Setup is based on dunglas/symfony-docker.
| Image | Tag | FrankenPHP | PHP |
|---|---|---|---|
| ghcr.io/requirecloud/frankenphp | 1.12.7-php8.4 | 1.12.7 | 8.4.24 |
| ghcr.io/requirecloud/frankenphp | 1.12.7-php8.4.24 | 1.12.7 | 8.4.24 |
| ghcr.io/requirecloud/frankenphp | 1.12.7-php8 | 1.12.7 | 8.5.9 |
| ghcr.io/requirecloud/frankenphp | 1.12.7-php8.5 | 1.12.7 | 8.5.9 |
| ghcr.io/requirecloud/frankenphp | 1.12.7-php8.5.9 | 1.12.7 | 8.5.9 |
| ghcr.io/requirecloud/frankenphp | latest | 1.12.7 | 8.5.9 |
All tags are released with linux/amd64 and linux/arm64 architecture.
These are the extensions added with install-php-extensions
- @composer
- apcu
- intl
- opcache
- zip
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;- Add build and push workflow in GHA
- App specific Caddyfiles e.g. Drupal
- Should Vulcain be removed?
- Should mysql and postgresql be included?