Skip to content

Commit

Permalink
Minor fixes for 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelosz committed Sep 27, 2020
1 parent 831a83b commit c7cb6e5
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 34 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ $ docker-compose -f docker-compose-build.yml build
> Docker Hub builds are based on this logic. See CHANGELOG to check the software versions used in the Docker Hub build release.
## CHANGELOG
### \[1.1.1\] - 2020-09-27
- Minor issues fixed
### \[1.1.0\] - 2020-09-26
- MISP version updated to v2.4.132
### \[1.0.1\] - 2020-04-14
Expand Down
7 changes: 3 additions & 4 deletions core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
php-mysql \
php-redis \
php-gd \
php-zip \
php-intl \
# Python Requirements
python3 \
python3-setuptools \
Expand All @@ -128,7 +130,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
postfix \
cron \
logrotate \
syslog-ng-core \
rsyslog \
ssdeep \
libfuzzy2 \
mariadb-client \
Expand Down Expand Up @@ -209,9 +211,6 @@ RUN rm -rf taxonomies && git clone https://github.com/MISP/misp-taxonomies.git .
#
COPY files/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Modify syslog configuration
RUN sed -i -E 's/^(\s*)system\(\);/\1unix-stream("\/dev\/log");/' /etc/syslog-ng/syslog-ng.conf

# Trigger to perform first boot operations
RUN touch /.firstboot.tmp

Expand Down
20 changes: 10 additions & 10 deletions core/files/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ if [ -r /.firstboot.tmp ]; then
exit 1
fi

# Waiting for DB to be ready
while ! mysqladmin ping -h"$MYSQL_HOST" --silent; do
sleep 5
echo "[-] INFO: Waiting for database to be ready..."
done
# Waiting for DB to be ready
while ! mysqladmin ping -h"$MYSQL_HOST" -u"$MYSQL_ROOT_USER" -p"$MYSQL_ROOT_PASSWORD" --silent; do
sleep 5
echo "[-] INFO: Waiting for database to be ready..."
done

# Set MYSQL_PASSWORD
if [ -z "$MYSQL_PASSWORD" ]; then
Expand Down Expand Up @@ -145,15 +145,15 @@ if [ -r /.firstboot.tmp ]; then
echo "[-] INFO: Adjusting other MISP settings..."
/var/www/MISP/app/Console/cake Admin setSetting "MISP.python_bin" $(which python3)

/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Enrichment_services_url" "http://misp_modules"
/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Enrichment_services_enable" true
/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Enrichment_hover_enable" true
/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Enrichment_services_url" "http://misp_modules"

/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Import_services_enable" true
/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Import_services_url" "http://misp_modules"
/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Import_services_enable" true

/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Export_services_enable" true
/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Export_services_url" "http://misp_modules"
/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Export_services_enable" true

/var/www/MISP/app/Console/cake Admin setSetting "Plugin.Cortex_services_enable" false

Expand Down Expand Up @@ -228,8 +228,8 @@ __WELCOME__
rm -f /.firstboot.tmp
fi

# Start syslog-ng, cron and postfix
service syslog-ng start
# Start rsyslog, cron and postfix
service rsyslog start
service cron start
service postfix start

Expand Down
57 changes: 38 additions & 19 deletions modules/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,45 @@
#
# Build and Install MISP Modules
#
FROM python:3.7-slim-buster
FROM python:3.7-slim-buster as builder
ENV DEBIAN_FRONTEND noninteractive
ARG MODULES_TAG

RUN apt-get update && apt-get install -y --no-install-recommends \
virtualenv \
cmake \
git \
python3-dev \
build-essential \
pkg-config \
libpoppler-cpp-dev \
libfuzzy-dev \
libpq5 libjpeg-dev tesseract-ocr imagemagick libopencv-dev zbar-tools libzbar0 libzbar-dev \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

RUN git clone --branch ${MODULES_TAG} --depth 1 https://github.com/MISP/misp-modules.git /opt/misp-modules;

WORKDIR /opt/misp-modules
RUN pip3 install -I -r REQUIREMENTS
RUN pip3 install .

ENTRYPOINT [ "misp-modules", "-l", "0.0.0.0"]
cmake \
git \
python3-dev \
python3-pip \
python3-wheel \
build-essential \
pkg-config \
libpoppler-cpp-dev \
libfuzzy-dev \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

# Build MISP Modules
RUN mkdir /wheel
WORKDIR /srv

RUN git clone --branch ${MODULES_TAG} --depth 1 https://github.com/MISP/misp-modules.git /srv/misp-modules; \
cd /srv/misp-modules || exit; sed -i 's/-e //g' REQUIREMENTS; pip3 wheel -r REQUIREMENTS --no-cache-dir -w /wheel/

RUN git clone --depth 1 https://github.com/stricaud/faup.git /srv/faup; \
cd /srv/faup/build || exit; cmake .. && make install; \
cd /srv/faup/src/lib/bindings/python || exit; pip3 wheel --no-cache-dir -w /wheel/ .

FROM python:3.7-slim-buster

RUN apt-get update && apt-get install -y --no-install-recommends \
libglib2.0-0 \
libzbar0 \
libxrender1 \
libxext6 \
libpoppler-cpp0v5 \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

COPY --from=builder /wheel /wheel
COPY --from=builder /usr/local/lib/libfaupl* /usr/local/lib/
RUN pip install /wheel/*.whl; ldconfig

ENTRYPOINT [ "/usr/local/bin/misp-modules", "-l", "0.0.0.0"]
2 changes: 1 addition & 1 deletion template.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MYSQL_ROOT_PASSWORD=misp

MISP_ADMIN_EMAIL=[email protected]
MISP_ADMIN_PASSPHRASE=admin
MISP_BASEURL=localhost
MISP_BASEURL="http://localhost"

POSTFIX_RELAY_HOST=misp_mail
TIMEZONE=UTC
Expand Down

0 comments on commit c7cb6e5

Please sign in to comment.