rob-revisited/docker/web-dev/Dockerfile

16 lines
1.1 KiB
Docker

# The web projects of the JumPHP IDE (bin/jumphp web:serve, tools/web.sh): FrankenPHP with the PHP extensions Symfony,
# WordPress, PrestaShop, Sylius and Laravel need, Composer, and a Caddyfile serving $DOC_ROOT on :8080 (run as the user).
# One image per PHP version: jumphp/web:php<PHP_VERSION> (the project's version, .jumphp/web.json "php" or what Composer needs).
ARG PHP_VERSION=8.4
FROM dunglas/frankenphp:1-php${PHP_VERSION}
ARG PHP_VERSION
RUN install-php-extensions pdo_mysql mysqli pdo_pgsql pgsql pdo_sqlite xdebug gd intl zip opcache exif bcmath soap sodium apcu \
&& mkdir -p /etc/jumphp
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
COPY Caddyfile /etc/jumphp/Caddyfile
COPY php.ini /usr/local/etc/php/conf.d/zz-jumphp-web.ini
# Xdebug is there but off: web:serve with JUMPHP_XDEBUG (the IDE's Debug) turns it on (XDEBUG_MODE=debug)
ENV XDG_CONFIG_HOME=/tmp/caddy-config XDG_DATA_HOME=/tmp/caddy-data DOC_ROOT=/app/public XDEBUG_MODE=off
LABEL jumphp.web.rev="4" jumphp.web.php="${PHP_VERSION}"
WORKDIR /app
CMD ["frankenphp", "run", "--config", "/etc/jumphp/Caddyfile"]