From a36ebe8f7daa5e2bed5875aa5757ccf0deabdbfe Mon Sep 17 00:00:00 2001 From: Jason Kendall Date: Wed, 11 Dec 2019 09:12:41 -0500 Subject: [PATCH] Move composer build to it's own builder --- server/Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index cc9a274..befb627 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -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