2019-11-28 19:30:53 +01:00
|
|
|
FROM python:3.7-slim-buster as builder
|
2019-11-25 22:58:18 +01:00
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2020-01-28 18:54:36 +01:00
|
|
|
ARG VERSION=2.4.120
|
2019-11-25 22:58:18 +01:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
git \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
2019-11-28 19:30:53 +01:00
|
|
|
python3-wheel \
|
2019-11-25 22:58:18 +01:00
|
|
|
build-essential \
|
|
|
|
pkg-config \
|
|
|
|
libpoppler-cpp-dev \
|
2020-01-28 20:21:33 +01:00
|
|
|
libfuzzy-dev \
|
2019-11-25 22:58:18 +01:00
|
|
|
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2019-11-28 19:30:53 +01:00
|
|
|
# Build MISP Modules
|
|
|
|
WORKDIR /srv
|
|
|
|
RUN git clone --branch v${VERSION} --depth 1 https://github.com/MISP/misp-modules.git
|
|
|
|
RUN mkdir /wheel
|
|
|
|
WORKDIR /srv/misp-modules
|
|
|
|
RUN sed -i 's/-e //g' REQUIREMENTS
|
|
|
|
RUN pip3 wheel -r REQUIREMENTS --no-cache-dir -w /wheel/
|
2019-11-25 22:58:18 +01:00
|
|
|
|
2019-11-28 19:30:53 +01:00
|
|
|
FROM python:3.7-slim-buster
|
2019-11-25 22:58:18 +01:00
|
|
|
|
2019-11-28 19:30:53 +01:00
|
|
|
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/*
|
2019-11-25 22:58:18 +01:00
|
|
|
|
2019-11-28 19:30:53 +01:00
|
|
|
COPY --from=builder /wheel /wheel
|
|
|
|
RUN pip install /wheel/*.whl
|
2019-11-25 22:58:18 +01:00
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/misp-modules", "-l", "0.0.0.0"]
|