diff --git a/.docker/partdb-entrypoint.sh b/.docker/partdb-entrypoint.sh index 3e06256a..5bfc6b48 100644 --- a/.docker/partdb-entrypoint.sh +++ b/.docker/partdb-entrypoint.sh @@ -39,8 +39,8 @@ if [ -d /var/www/html/var/db ]; then fi fi -# Start PHP-FPM -service php8.1-fpm start +# Start PHP-FPM (the PHP_VERSION is replaced by the configured version in the Dockerfile) +service phpPHP_VERSION-fpm start # first arg is `-f` or `--some-option` (taken from https://github.com/docker-library/php/blob/master/8.2/bullseye/apache/docker-php-entrypoint) if [ "${1#-}" != "$1" ]; then diff --git a/Dockerfile b/Dockerfile index 9e0bf8c8..cd01fded 100644 --- a/Dockerfile +++ b/Dockerfile @@ -163,6 +163,9 @@ ENV DATABASE_URL="sqlite:///%kernel.project_dir%/uploads/app.db" USER root +# Replace the php version placeholder in the entry point, with our php version +RUN sed -i "s/PHP_VERSION/${PHP_VERSION}/g" ./.docker/partdb-entrypoint.sh + # Copy entrypoint and apache2-foreground to /usr/local/bin and make it executable RUN install ./.docker/partdb-entrypoint.sh /usr/local/bin && \ install ./.docker/apache2-foreground /usr/local/bin