From add4beee3179bee275abc1214e8539ee1dd817b5 Mon Sep 17 00:00:00 2001 From: lub Date: Wed, 28 Aug 2019 12:13:45 +0200 Subject: [PATCH] move src code copy to second stage this enables better caching in case the dependencies stay the same and the only actual code changed --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bd941ac..fbaf5f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM docker.io/composer AS composer WORKDIR /app -COPY composer.json main.php functions.php ./ +COPY composer.json ./ RUN composer install @@ -11,6 +11,7 @@ RUN composer install FROM docker.io/php:alpine COPY --from=composer /app /app +COPY main.php functions.php ./ WORKDIR /app