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 \
|
2024-03-05 18:50:35 +00:00
|
|
|
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 && \
|
2024-03-05 18:50:35 +00:00
|
|
|
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 \
|
2024-03-05 18:50:35 +00:00
|
|
|
libffi-dev \
|
2024-11-29 12:01:18 +00:00
|
|
|
musl-dev \
|
2024-03-05 18:50:35 +00:00
|
|
|
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
|