misp-docker/modules/Dockerfile

38 lines
1.2 KiB
Docker
Raw Normal View History

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
ARG MISP_TAG
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
2020-01-30 15:34:17 +01:00
RUN git clone --branch v${MISP_TAG} --depth 1 https://github.com/MISP/misp-modules.git
2019-11-28 19:30:53 +01:00
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"]