From a3074400e019cfc5f7b5bb796a127f29d8014d7b Mon Sep 17 00:00:00 2001 From: Eduardo Balsa Date: Wed, 14 Apr 2021 14:11:16 +0200 Subject: [PATCH] Added support for brotli --- server/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 8233f67..0c97eec 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -17,8 +17,9 @@ FROM debian:buster-slim as php-build && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* RUN pecl channel-update pecl.php.net - RUN cp /usr/lib/x86_64-linux-gnu/libfuzzy.* /usr/lib; pecl install ssdeep - RUN pecl install rdkafka + RUN cp /usr/lib/x86_64-linux-gnu/libfuzzy.* /usr/lib; pecl install ssdeep && pecl install rdkafka + RUN git clone --recursive --depth=1 https://github.com/kjdev/php-ext-brotli.git && cd php-ext-brotli && phpize && ./config && ./configure && make && make install + FROM debian:buster-slim as python-build RUN apt-get update; apt-get install -y --no-install-recommends \ @@ -134,12 +135,13 @@ ARG PHP_VER # 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=php-build /usr/lib/php/${PHP_VER}/rdkafka.so /usr/lib/php/${PHP_VER}/rdkafka.so + COPY --from=php-build /usr/lib/php/${PHP_VER}/brotli.so /usr/lib/php/${PHP_VER}/brotli.so COPY --from=composer-build /tmp/Vendor /var/www/MISP/app/Vendor COPY --from=composer-build /tmp/Plugin /var/www/MISP/app/Plugin RUN for dir in /etc/php/*; do echo "extension=rdkafka.so" > "$dir/mods-available/rdkafka.ini"; done; phpenmod rdkafka - + RUN for dir in /etc/php/*; do echo "extension=brotli.so" > "$dir/mods-available/brotli.ini"; done; phpenmod brotli RUN for dir in /etc/php/*; do echo "extension=ssdeep.so" > "$dir/mods-available/ssdeep.ini"; done \ ;phpenmod redis \