-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
745 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
FROM python:3.9-bullseye | ||
|
||
ENV LANG=C.UTF-8 | ||
ENV PATH=/opt/venv/bin:${PATH} | ||
ENV INTELMQ_PATHS_NO_OPT=1 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install dependencides | ||
RUN apt-get update -y && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends python3 \ | ||
python3-pip \ | ||
git \ | ||
build-essential \ | ||
python3-dev \ | ||
libcurl4-gnutls-dev \ | ||
libgnutls28-dev \ | ||
libffi-dev \ | ||
curl \ | ||
sudo \ | ||
vim \ | ||
jq \ | ||
cron \ | ||
libpq-dev \ | ||
logrotate && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/www/html && \ | ||
python3 -m venv --upgrade-deps /opt/venv | ||
|
||
# Copy IntelMQ complete requirements | ||
COPY requirements.txt /tmp/requirements.txt | ||
|
||
# Install IntelMQ dependencies (before copying the sources -> makes for faster repeated build times) | ||
RUN pip install -r /tmp/requirements.txt | ||
|
||
# Copy IntelMQ sources | ||
COPY . /tmp/intelmq | ||
|
||
# Install IntelMQ | ||
RUN pip3 install /tmp/intelmq | ||
|
||
# Add intelmq user | ||
RUN useradd --system --uid 995 --create-home --home-dir /var/lib/intelmq --shell /bin/bash intelmq | ||
|
||
# Setup IntelMQ and clean | ||
RUN intelmqsetup && \ | ||
rm -rf /tmp/intelmq /tmp/requirements.txt | ||
|
||
# Switch to intelmq user | ||
USER intelmq | ||
|
||
CMD ["intelmq", "server", "start"] |
Oops, something went wrong.