From d05206ba37c6be7292e01b4caf563fb98e584f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Tue, 23 May 2023 21:26:09 +0200 Subject: [PATCH] refactor: simplify Dockerfile --- Dockerfile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e1adf5..8554a65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,6 @@ # https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage # https://docs.docker.com/compose/compose-file/#target -# Builder images -FROM composer/composer:2-bin AS composer - -# hadolint ignore=DL3007 -FROM mlocati/php-extension-installer:latest AS php_extension_installer - # Build Caddy with the Mercure and Vulcain modules # Temporary fix for https://github.com/dunglas/mercure/issues/770 FROM caddy:2.7-builder-alpine AS app_caddy_builder @@ -34,7 +28,7 @@ ENV APP_ENV=prod WORKDIR /srv/app # php extensions installer: https://github.com/mlocati/docker-php-extension-installer -COPY --from=php_extension_installer --link /usr/bin/install-php-extensions /usr/local/bin/ +COPY --from=mlocati/php-extension-installer:latest --link /usr/bin/install-php-extensions /usr/local/bin/ # persistent / runtime deps # hadolint ignore=DL3018 @@ -79,7 +73,7 @@ CMD ["php-fpm"] ENV COMPOSER_ALLOW_SUPERUSER=1 ENV PATH="${PATH}:/root/.composer/vendor/bin" -COPY --from=composer --link /composer /usr/bin/composer +COPY --from=composer/composer:2-bin --link /composer /usr/bin/composer # prevent the reinstallation of vendors at every changes in the source code COPY --link composer.* symfony.* ./