From fa43de5748ce93474d3deface141f369ea39fe77 Mon Sep 17 00:00:00 2001 From: matt-saunders <31736190+matt-saunders@users.noreply.github.com> Date: Tue, 12 Jun 2018 23:32:49 -0400 Subject: [PATCH] Update to resolve install issues Added WORKDIR to line 34 to resolve the following errors: fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git fatal: not in a git directory Added lines 60 and 61 to resolve the following errors: ERROR [mispevent.py:52 - () ] Cannot import jsonschema Traceback (most recent call last): File "/var/www/MISP/PyMISP/pymisp/mispevent.py", line 50, in import jsonschema ModuleNotFoundError: No module named 'jsonschema' WARNING [__init__.py:46 - () ] Unable to load pymisp properly: No module named 'requests' Edited line 136 to resolve the following error: /bin/sh: 1: cannot create /etc/php/7.0/mods-available/ssdeep.ini: Directory nonexistent WARNING: Module ssdeep ini file doesn't exist under /etc/php/7.2/mods-available WARNING: Module ssdeep ini file doesn't exist under /etc/php/7.2/mods-available --- container/Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index 8623b80..d260e5a 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -29,8 +29,10 @@ RUN sed -i -E 's/^(\s*)system\(\);/\1unix-stream("\/dev\/log");/' /etc/syslog-ng a2enmod ssl rewrite headers; \ a2ensite 000-default ; \ a2ensite default-ssl ; \ - mkdir -p /var/www/MISP /root/.config /root/.git ; \ - chown -R www-data:www-data /var/www/MISP /root/.config /root/.git; \ + mkdir -p /var/www/MISP /root/.config /root/.git + +WORKDIR /var/www/MISP +RUN chown -R www-data:www-data /var/www/MISP /root/.config /root/.git; \ sudo -u www-data -H git clone https://github.com/MISP/MISP.git /var/www/MISP ; \ sudo -u www-data -H git checkout tags/$(git describe --tags `git rev-list --tags --max-count=1`) ; \ sudo -u www-data -H git config core.filemode false ; \ @@ -55,6 +57,9 @@ WORKDIR /var/www/MISP RUN sudo -u www-data -H git submodule init ; \ sudo -u www-data -H git submodule update +RUN sudo pip3 install jsonschema ; \ + sudo pip3 install pymisp + WORKDIR /var/www/MISP/PyMISP RUN python3 setup.py install @@ -130,7 +135,7 @@ RUN sed -i -e 's/db login/misp/g' /var/www/MISP/app/Config/database.php ; \ sudo -u www-data -H wget http://downloads.sourceforge.net/project/ssdeep/ssdeep-2.13/ssdeep-2.13.tar.gz ; \ tar zxvf ssdeep-2.13.tar.gz && cd ssdeep-2.13 && ./configure && make && sudo make install ; \ sudo pecl install ssdeep ; \ - sudo echo "extension=ssdeep.so" > /etc/php/7.0/mods-available/ssdeep.ini ; \ + sudo echo "extension=ssdeep.so" > /etc/php/7.2/mods-available/ssdeep.ini ; \ sudo phpenmod ssdeep ; \ echo "#!/bin/bash" > /init-db ; \ echo "if [ ! -f /var/lib/mysql/.db_initialized ]; then" >> /init-db ; \