From 3c9bf56c539653816bd59d7edae83111bce7f95d Mon Sep 17 00:00:00 2001 From: Jeremy Barlow Date: Fri, 6 Apr 2018 12:17:48 -0700 Subject: [PATCH] Enable additional volume mounts and ports by default This commit exposes volume mounts by default for the MISP and SSL cert/key directories. This commit also exposes ports for external configuration, including the web server (80 and 443), mysql (3306), redis (6379), and MISP ZeroMQ (50000). --- container/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index a6d1531..15f6614 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -10,11 +10,12 @@ ARG MISP_EMAIL=admin@localhost # Dir you need to override to keep data on reboot/new container: VOLUME /var/lib/mysql -#VOLUME /var/www/MISP/Config # Dir you might want to override in order to have custom ssl certs # Need: "misp.key" and "misp.crt" -#VOLUME /etc/ssl/private +VOLUME /etc/ssl/private + +EXPOSE 80 443 3306 6379 50000 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && apt-get install -y supervisor cron logrotate syslog-ng-core postfix curl gcc git gnupg-agent make python openssl redis-server sudo vim zip wget mariadb-client mariadb-server apache2 apache2-doc apache2-utils libapache2-mod-php php php-cli php-crypt-gpg php-dev php-json php-mysql php-opcache php-readline php-redis python-dev python-pip libxml2-dev libxslt1-dev zlib1g-dev python-setuptools rng-tools python3 python3-dev python3-pip libpq5 libjpeg-dev @@ -112,6 +113,8 @@ RUN mkdir /var/www/.composer && chown -R www-data:www-data /var/www/.composer ; sudo -u www-data cp -a /var/www/MISP/app/Config/core.default.php /var/www/MISP/app/Config/core.php ; \ sudo -u www-data cp -a /var/www/MISP/app/Config/config.default.php /var/www/MISP/app/Config/config.php +VOLUME /var/www/MISP/app/Config + RUN sed -i -e 's/db login/misp/g' /var/www/MISP/app/Config/database.php ; \ sed -i -e "s/db password/${MYSQL_MISP_PASSWORD}/g" /var/www/MISP/app/Config/database.php ; \ sed -i -E "s/'salt'(\s+)=>\s''/'salt' => '`openssl rand -base64 32 | tr \'/\' \'0\'`'/" /var/www/MISP/app/Config/config.php ; \