-
Notifications
You must be signed in to change notification settings - Fork 195
Expand file tree
/
Copy pathDockerfile
More file actions
81 lines (74 loc) · 2.28 KB
/
Dockerfile
File metadata and controls
81 lines (74 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
FROM ubuntu:22.04
# To avoid user interaction when installing libraries
ENV DEBIAN_FRONTEND=noninteractive
# Blocking module requirement to avoid using sudo
ENV IS_IN_A_DOCKER_CONTAINER=True
# destionation dir for slips inside the container
ENV SLIPS_DIR=/StratosphereLinuxIPS
# use bash instead of sh
SHELL ["/bin/bash", "-c"]
# Install wget and add Zeek and redis repositories to our sources.
RUN apt update && apt install -y --no-install-recommends \
wget \
ca-certificates \
git \
curl \
gnupg \
lsb-release \
software-properties-common \
build-essential \
file \
lsof \
iproute2 \
tshark \
whois \
yara \
net-tools \
less \
unzip \
python3-certifi \
python3-dev \
python3-tzlocal \
python3-pip \
&& echo 'deb http://download.opensuse.org/repositories/security:/zeek/xUbuntu_22.04/ /' | tee /etc/apt/sources.list.d/security:zeek.list \
&& curl -fsSL https://download.opensuse.org/repositories/security:zeek/xUbuntu_22.04/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/security_zeek.gpg > /dev/null \
&& curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" > /etc/apt/sources.list.d/redis.list \
&& apt update \
&& apt install -y --no-install-recommends --fix-missing \
zeek \
redis \
&& ln -s /opt/zeek/bin/zeek /usr/local/bin/bro \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY . ${SLIPS_DIR}
WORKDIR ${SLIPS_DIR}
RUN cd modules \
&& rm -rf \
rnn_cc_detection/ \
timeline/ \
kalipso/ \
p2ptrust/ \
flowmldetection/ \
cyst/ \
cesnet/ \
exporting_alerts/ \
riskiq/ \
template/ \
blocking/ \
virustotal/ \
&& cd .. \
&& rm -rf dataset/ docs/ tests/ \
&& rm kalipso.sh \
package.json \
pytest.ini \
webinterface.sh \
CITATION.cff \
CHANGELOG.md \
conftest.py
RUN pip3 install --no-cache-dir --upgrade pip \
&& grep -v -f docker/light/excluded_libs.txt install/requirements.txt | xargs -n 1 pip install \
&& chmod 774 slips.py \
&& git init \
&& git remote add origin https://github.com/stratosphereips/StratosphereLinuxIPS.git
CMD /bin/bash