Move composer build to it's own builder

pull/1/head
Jason Kendall 2019-12-11 09:12:41 -05:00
parent 061654e3e1
commit a36ebe8f7d
1 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,8 @@
FROM composer as composer-build
WORKDIR /tmp
ADD https://raw.githubusercontent.com/MISP/MISP/v2.4.118/app/composer.json /tmp
RUN composer install --ignore-platform-reqs
FROM debian:buster-slim as php-build
RUN apt-get update; apt-get install -y --no-install-recommends \
gcc \
@ -99,11 +104,9 @@ ARG PHP_VER=20180731
# PHP
# Install ssdeep prebuild, latest composer, then install the app's PHP deps
COPY --from=php-build /usr/lib/php/${PHP_VER}/ssdeep.so /usr/lib/php/${PHP_VER}/ssdeep.so
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/MISP/app
RUN composer install \
# Enable CakeResque with php-redis
;phpenmod redis \
COPY --from=composer-build /tmp/Vendor /var/www/MISP/app/Vendor
COPY --from=composer-build /tmp/Plugin /var/www/MISP/app/Plugin
RUN phpenmod redis \
# Enable CakeResque with php-gnupgp
;phpenmod gnupg \
# Enable ssdeep we build earlier