mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-10-27 10:40:10 +00:00
🐛✨Fix & Improve Suricata Dockerfile
# Summary of Changes ## Bugfixes 🐛 * Add `py3-pip` (Alpine apk package for Python3 Pip). The absence of this APK dependency will cause the container build to fail. * Add a step to create an empty file at `/root/dist/empty.conf`, this ensures subsequent steps to cleanup don't cause the container build to fail. ## Improvements ✨ * Invoke `make` with `-j $(nproc)`. This forces `make` to spread the build process out over the number of logical cores available to the `make` process, significantly decreasing build times on multi-core systems.
This commit is contained in:
parent
af6ce8854d
commit
481a7ab732
1 changed files with 6 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ ADD dist/ /root/dist/
|
||||||
# Install packages
|
# Install packages
|
||||||
#RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
#RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||||
RUN apk -U add \
|
RUN apk -U add \
|
||||||
|
py3-pip \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
file \
|
file \
|
||||||
|
|
@ -83,16 +84,17 @@ RUN apk -U add \
|
||||||
--enable-gccprotect \
|
--enable-gccprotect \
|
||||||
--enable-pie \
|
--enable-pie \
|
||||||
--enable-luajit && \
|
--enable-luajit && \
|
||||||
make && \
|
make -j $(nproc) && \
|
||||||
make check && \
|
make check -j $(nproc) && \
|
||||||
make install && \
|
make install -j $(nproc) && \
|
||||||
make install-full && \
|
make install-full -j $(nproc) && \
|
||||||
#
|
#
|
||||||
# Setup user, groups and configs
|
# Setup user, groups and configs
|
||||||
addgroup -g 2000 suri && \
|
addgroup -g 2000 suri && \
|
||||||
adduser -S -H -u 2000 -D -g 2000 suri && \
|
adduser -S -H -u 2000 -D -g 2000 suri && \
|
||||||
chmod 644 /etc/suricata/*.config && \
|
chmod 644 /etc/suricata/*.config && \
|
||||||
cp /root/dist/*.yaml /etc/suricata/ && \
|
cp /root/dist/*.yaml /etc/suricata/ && \
|
||||||
|
touch /root/dist/empty.conf && \
|
||||||
cp /root/dist/*.conf /etc/suricata/ && \
|
cp /root/dist/*.conf /etc/suricata/ && \
|
||||||
cp /root/dist/*.bpf /etc/suricata/ && \
|
cp /root/dist/*.bpf /etc/suricata/ && \
|
||||||
mkdir -p /etc/suricata/rules && \
|
mkdir -p /etc/suricata/rules && \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue