Moved the full install to a second build step

This commit is contained in:
Alex Wright 2019-01-22 12:40:23 +01:00
parent 927afa730e
commit 846b0c19d7
1 changed files with 6 additions and 1 deletions

View File

@ -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