From 87a324b0cd653ee3fd09262d87b0cfe24774fc10 Mon Sep 17 00:00:00 2001 From: Eduardo Balsa Date: Wed, 14 Apr 2021 14:02:31 +0200 Subject: [PATCH 1/6] Added support for rdkafka --- server/Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index dcba944..845f417 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -13,9 +13,12 @@ FROM debian:buster-slim as php-build php \ php-dev \ php-pear \ + librdkafka-dev \ && 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 FROM debian:buster-slim as python-build RUN apt-get update; apt-get install -y --no-install-recommends \ @@ -129,9 +132,16 @@ ARG PHP_VER # 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=php-build /usr/lib/php/${PHP_VER}/rdkafka.so /usr/lib/php/${PHP_VER}/rdkafka.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=ssdeep.so" > "$dir/mods-available/ssdeep.ini"; done \ + RUN for dir in /etc/php/*; do echo "extension=rdkafka.so" > "$dir/mods-available/rdkafka.ini"; done ;phpenmod redis \ # Enable CakeResque with php-gnupgp ;phpenmod gnupg \ From d3ef1564d2f127922889e3c61f0bcc36b6e1da6d Mon Sep 17 00:00:00 2001 From: Eduardo Balsa Date: Wed, 14 Apr 2021 14:04:17 +0200 Subject: [PATCH 2/6] Added support for rdkafka --- server/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 845f417..b696c90 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -137,12 +137,11 @@ ARG PHP_VER 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=rdkafka.so" > "$dir/mods-available/rdkafka.ini"; done; phpenmod rdkafka + RUN for dir in /etc/php/*; do echo "extension=ssdeep.so" > "$dir/mods-available/ssdeep.ini"; done \ - RUN for dir in /etc/php/*; do echo "extension=rdkafka.so" > "$dir/mods-available/rdkafka.ini"; done - ;phpenmod redis \ + ;phpenmod redis \ # Enable CakeResque with php-gnupgp ;phpenmod gnupg \ # Enable ssdeep we build earlier From fd30185aa931722013f39ee041d92de6cacf746a Mon Sep 17 00:00:00 2001 From: Eduardo Balsa Date: Wed, 14 Apr 2021 14:06:54 +0200 Subject: [PATCH 3/6] Added support for rdkafka --- server/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/server/Dockerfile b/server/Dockerfile index b696c90..8233f67 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -115,6 +115,7 @@ ARG PHP_VER php-gd \ php-fpm \ php-zip \ + librdkafka1 \ # Unsure we need these zip unzip \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* From a3074400e019cfc5f7b5bb796a127f29d8014d7b Mon Sep 17 00:00:00 2001 From: Eduardo Balsa Date: Wed, 14 Apr 2021 14:11:16 +0200 Subject: [PATCH 4/6] 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 \ From 3a3f0637e42d9717f7bfc4917578b8973e79fb0f Mon Sep 17 00:00:00 2001 From: Eduardo Balsa Date: Wed, 14 Apr 2021 14:13:37 +0200 Subject: [PATCH 5/6] Added support for brotli --- server/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/Dockerfile b/server/Dockerfile index 0c97eec..a486309 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -14,6 +14,7 @@ FROM debian:buster-slim as php-build php-dev \ php-pear \ librdkafka-dev \ + git \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* RUN pecl channel-update pecl.php.net @@ -117,6 +118,7 @@ ARG PHP_VER php-fpm \ php-zip \ librdkafka1 \ + libbrotli1 \ # Unsure we need these zip unzip \ && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* From 7f6fcdde85ea9d3b43227e3b94db6ed6e712da8d Mon Sep 17 00:00:00 2001 From: Eduardo Balsa Date: Wed, 14 Apr 2021 14:20:49 +0200 Subject: [PATCH 6/6] Added support for brotli --- server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/Dockerfile b/server/Dockerfile index a486309..b3b5e2c 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -19,7 +19,7 @@ FROM debian:buster-slim as php-build RUN pecl channel-update pecl.php.net 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 + RUN git clone --recursive --depth=1 https://github.com/kjdev/php-ext-brotli.git && cd php-ext-brotli && phpize && ./configure && make && make install FROM debian:buster-slim as python-build