FROM composer AS base WORKDIR /app COPY src/composer.json src/composer.lock /app/ RUN composer install --no-autoloader FROM composer RUN apk add postgresql-dev openldap-dev \ && docker-php-ext-install pdo mbstring pdo_pgsql ldap COPY ./src /app COPY --from=base /app/vendor /app/vendor RUN composer install