tpotce/docker/honeypots/Dockerfile

40 lines
823 B
Text
Raw Normal View History

2024-11-29 12:01:18 +00:00
FROM alpine:3.20
2021-11-18 19:55:44 +00:00
#
# Include dist
2022-03-08 23:36:03 +00:00
COPY dist/ /root/dist/
2021-11-18 19:55:44 +00:00
#
# Install packages
2024-09-11 10:42:17 +00:00
RUN apk --no-cache -U add \
build-base \
libcap \
libffi-dev \
musl-dev \
openssl \
openssl-dev \
py3-pip \
python3 \
2024-11-29 12:01:18 +00:00
python3-dev && \
2021-11-18 19:55:44 +00:00
#
# Install honeypots from GitHub and setup
2024-11-29 12:01:18 +00:00
pip3 install --break-system-packages --no-cache-dir honeypots && \
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
2021-11-18 19:55:44 +00:00
#
# Setup user, groups and configs
2024-11-29 12:01:18 +00:00
mkdir -p /etc/honeypots/ && \
cp /root/dist/config.json /etc/honeypots/ && \
2021-11-18 19:55:44 +00:00
#
# Clean up
2024-11-29 12:01:18 +00:00
apk del --purge \
build-base \
libffi-dev \
2024-11-29 12:01:18 +00:00
musl-dev \
openssl-dev \
2024-11-29 12:01:18 +00:00
py3-pip \
python3-dev && \
2024-09-11 10:42:17 +00:00
rm -rf /root/* \
2021-11-18 19:55:44 +00:00
#
# Start honeypots
STOPSIGNAL SIGINT
2024-11-29 12:01:18 +00:00
USER 2000:2000
CMD python3 -E -m honeypots --setup all --config /etc/honeypots/config.json