From 33421a53e3c33aff9eddf67494a91206f3dc3faa Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Sun, 7 Mar 2021 12:49:14 -0500 Subject: [PATCH 1/3] Update to Ubuntu "focal" 20.04 LTS The "bionic" distro is older and includes a version of PHP (7.2) that is older than what MISP recommends (>=7.4). Additionally, "bionic" is supposed to be EOL later this year, so updating the project to keep current. Necessary changes to PHP & libpoppler versions. Signed-off-by: Coleman Kane --- web/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/Dockerfile b/web/Dockerfile index 3578938..095bb02 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,5 +1,5 @@ -FROM ubuntu:bionic +FROM ubuntu:focal # Install core components ENV DEBIAN_FRONTEND noninteractive @@ -19,7 +19,8 @@ RUN apt-get install -y apache2 apache2-doc apache2-utils && \ a2dismod status && \ a2dissite 000-default -# PHP 7.2 and install MySQL PDO extension +# PHP 7.4 and install MySQL PDO extension +RUN apt-get update RUN apt-get install -y libapache2-mod-php php php-dev php-json \ php-mysql php-redis php-xml php-mbstring \ php-gd php-pear php-opcache \ @@ -31,7 +32,7 @@ RUN sed -i \ -e "s/memory_limit = 128M/memory_limit = 2048M/" \ -e "s/upload_max_filesize = 2M/upload_max_filesize = 50M/" \ -e "s/post_max_size = 8M/post_max_size = 50M/" \ - /etc/php/7.2/apache2/php.ini + /etc/php/7.4/apache2/php.ini RUN apt-get install -y python3-dev python3-pip python3-setuptools \ python3-lxml libjpeg-dev \ @@ -133,7 +134,7 @@ RUN rm -rf misp-objects && git clone https://github.com/MISP/misp-objects.git && chown -R www-data:www-data misp-objects misp-galaxy warninglists taxonomies # Install MISP build requirements -RUN sudo -E apt-get -y install libpoppler73 libpoppler-dev libpoppler-cpp-dev +RUN sudo -E apt-get -y install libpoppler97 libpoppler-dev libpoppler-cpp-dev # Install MISP Modules WORKDIR /opt From 5fa787cb7e96975d25b5f8cf89f39d97eef5e489 Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Sun, 7 Mar 2021 12:51:23 -0500 Subject: [PATCH 2/3] Run apt-get with --fix-missing to fix any version discrepancies for installed packages. Signed-off-by: Coleman Kane --- web/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/Dockerfile b/web/Dockerfile index 095bb02..07f5c52 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -21,7 +21,7 @@ RUN apt-get install -y apache2 apache2-doc apache2-utils && \ # PHP 7.4 and install MySQL PDO extension RUN apt-get update -RUN apt-get install -y libapache2-mod-php php php-dev php-json \ +RUN apt-get install -y --fix-missing libapache2-mod-php php php-dev php-json \ php-mysql php-redis php-xml php-mbstring \ php-gd php-pear php-opcache \ pkg-config libbson-1.0 libmongoc-1.0-0 From 94a4740bc8a49b0d0f8ada746573eabe893e2f22 Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Sun, 7 Mar 2021 12:52:42 -0500 Subject: [PATCH 3/3] Add "zip", "bcmath", and "intl" modules to PHP These three are recommended in the latest MISP diagnostics page, so I decided to add them to the docker build as well. Signed-off-by: Coleman Kane --- web/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/Dockerfile b/web/Dockerfile index 07f5c52..c5bafae 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -24,7 +24,8 @@ RUN apt-get update RUN apt-get install -y --fix-missing libapache2-mod-php php php-dev php-json \ php-mysql php-redis php-xml php-mbstring \ php-gd php-pear php-opcache \ - pkg-config libbson-1.0 libmongoc-1.0-0 + pkg-config libbson-1.0 libmongoc-1.0-0 \ + php-zip php-bcmath php-intl # Fix php.ini with recommended settings RUN sed -i \