Skip to content

requirecloud/frankenphp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RequireCloud FrankenPHP Docker images

Opinionated Docker images based on FrankenPHP (repo).

Setup is based on dunglas/symfony-docker.

Variants

Image Tag FrankenPHP PHP
ghcr.io/requirecloud/frankenphp 1.11.1-php8.4 1.11.1 8.4
ghcr.io/requirecloud/frankenphp 1.11.1-php8.4.x 1.11.1 8.4
ghcr.io/requirecloud/frankenphp 1.11.1-php8 1.11.1 8.5
ghcr.io/requirecloud/frankenphp 1.11.1-php8.5 1.11.1 8.5
ghcr.io/requirecloud/frankenphp 1.11.1-php8.5.x 1.11.1 8.5
ghcr.io/requirecloud/frankenphp latest 1.11.1 8.5

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:1

FROM ghcr.io/requirecloud/frankenphp:1.11.1-php8.5 AS frankenphp_base

# Install additional extensions
RUN 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 image
FROM 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 image
FROM 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 code
COPY --link composer.* ./
RUN set -eux; \
	composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress

# copy sources
COPY --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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •