mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-10-26 18:24:45 +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
|
||||
#RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||
RUN apk -U add \
|
||||
py3-pip \
|
||||
ca-certificates \
|
||||
curl \
|
||||
file \
|
||||
|
|
@ -83,16 +84,17 @@ RUN apk -U add \
|
|||
--enable-gccprotect \
|
||||
--enable-pie \
|
||||
--enable-luajit && \
|
||||
make && \
|
||||
make check && \
|
||||
make install && \
|
||||
make install-full && \
|
||||
make -j $(nproc) && \
|
||||
make check -j $(nproc) && \
|
||||
make install -j $(nproc) && \
|
||||
make install-full -j $(nproc) && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 suri && \
|
||||
adduser -S -H -u 2000 -D -g 2000 suri && \
|
||||
chmod 644 /etc/suricata/*.config && \
|
||||
cp /root/dist/*.yaml /etc/suricata/ && \
|
||||
touch /root/dist/empty.conf && \
|
||||
cp /root/dist/*.conf /etc/suricata/ && \
|
||||
cp /root/dist/*.bpf /etc/suricata/ && \
|
||||
mkdir -p /etc/suricata/rules && \
|
||||
|
|
|
|||
Loading…
Reference in a new issue