Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

moving ARG to place where they are first used to get better docker la… #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
FROM ubuntu:18.04
MAINTAINER Ventz Petkov <ventz_petkov@harvard.edu>

# User supplied inputs
ARG MYSQL_MISP_PASSWORD=ChangeThisDefaultPassworda9564ebc3289b7a14551baf8ad5ec60a
ARG POSTFIX_RELAY_HOST=localhost
ARG MISP_FQDN=localhost
ARG MISP_EMAIL=admin@localhost
ARG MISP_GPG_PASSWORD=ChangeThisDefaultPasswordXuJBao5Q2bps89LWFqWkKgDZwAFpNHvc

# Dir you need to override to keep data on reboot/new container:
VOLUME /var/lib/mysql
#VOLUME /var/www/MISP/Config
Expand All @@ -29,6 +22,8 @@ RUN sed -i "s/max_execution_time = 30/max_execution_time = 300/" /etc/php/7.2/ap
sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 50M/" /etc/php/7.2/apache2/php.ini ; \
sed -i "s/post_max_size = 8M/post_max_size = 50M/" /etc/php/7.2/apache2/php.ini

ARG POSTFIX_RELAY_HOST=localhost

#echo "test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld" ; \
RUN sed -i -E 's/^(\s*)system\(\);/\1unix-stream("\/dev\/log");/' /etc/syslog-ng/syslog-ng.conf ; \
postconf -e "relayhost = $POSTFIX_RELAY_HOST" ; \
Expand Down Expand Up @@ -78,6 +73,8 @@ RUN sudo -H git checkout ; \
sudo pip3 install -I .

#RUN sudo pip uninstall -y cybox
ARG MISP_FQDN=localhost
ARG MISP_EMAIL=admin@localhost

WORKDIR /var/www/MISP/app
RUN mkdir /var/www/.composer && chown -R www-data:www-data /var/www/.composer ; \
Expand Down Expand Up @@ -124,6 +121,9 @@ 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

ARG MYSQL_MISP_PASSWORD=ChangeThisDefaultPassworda9564ebc3289b7a14551baf8ad5ec60a
ARG MISP_GPG_PASSWORD=ChangeThisDefaultPasswordXuJBao5Q2bps89LWFqWkKgDZwAFpNHvc

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 ; \
Expand Down