healthcheck, watch pid not cpu
cleanup dockerfiles
bump dicompot, heralding, elasticpot, endlessh to alpine 3.19
bump dionaea, heralding to latest master
This commit is contained in:
t3chn0m4g3
2024-02-28 19:07:22 +01:00
parent 285b37a00d
commit be74fc75ca
69 changed files with 314 additions and 190 deletions

View File

@ -5,11 +5,11 @@ COPY dist/ /root/dist/
#
# Install packages
RUN apk --no-cache -U add \
git \
procps \
py3-psutil \
py3-requests \
python3 && \
git \
procps \
py3-psutil \
py3-requests \
python3 && \
#
# Install adbhoney from git
git clone https://github.com/huuck/ADBHoney /opt/adbhoney && \
@ -17,7 +17,7 @@ RUN apk --no-cache -U add \
# git checkout 2417a7a982f4fd527b3a048048df9a23178767ad && \
git checkout 42afd98611724ca3d694a48b694c957e8d953db4 && \
cp /root/dist/adbhoney.cfg /opt/adbhoney && \
cp /root/dist/cpu_check.py /opt/adbhoney && \
cp /root/dist/cpu_check.py / && \
sed -i 's/dst_ip/dest_ip/' /opt/adbhoney/adbhoney/core.py && \
sed -i 's/dst_port/dest_port/' /opt/adbhoney/adbhoney/core.py && \
#
@ -32,8 +32,8 @@ RUN apk --no-cache -U add \
#
# Set workdir and start adbhoney
STOPSIGNAL SIGINT
# Adbhoney sometimes hangs at 100% CPU usage, if detected process will be killed and container restarts per docker-compose settings
HEALTHCHECK --interval=5m --timeout=30s --retries=3 CMD python3 /opt/adbhoney/cpu_check.py
# Adbhoney sometimes hangs at 100% CPU usage, if detected container will become unhealthy and restarted by tpotinit
HEALTHCHECK --interval=5m --timeout=30s --retries=3 CMD python3 /cpu_check.py $(pgrep -of run.py) 99
USER adbhoney:adbhoney
WORKDIR /opt/adbhoney/
CMD /usr/bin/python3 run.py