From 846b0c19d742d1ffff022bf801e510c88dc513f5 Mon Sep 17 00:00:00 2001 From: Alex Wright Date: Tue, 22 Jan 2019 12:40:23 +0100 Subject: [PATCH] Moved the full install to a second build step --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5b57369..dcb7229 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,12 @@ -FROM composer +FROM composer AS base RUN apk add postgresql-dev openldap-dev \ && docker-php-ext-install pdo mbstring pdo_pgsql ldap WORKDIR /app COPY src/composer.json src/composer.lock /app/ RUN composer install --no-autoloader + +FROM composer AS install +COPY ./src /app +COPY --from=base /app/vendor /app/vendor +RUN composer install