tpotce/docker/elasticpot/Dockerfile

47 lines
1.1 KiB
Text
Raw Normal View History

2020-02-25 16:59:22 +00:00
FROM alpine:latest
2019-08-28 14:12:52 +00:00
#
# Include dist
ADD dist/ /root/dist/
2019-08-28 14:12:52 +00:00
#
# Install packages
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U add \
build-base \
ca-certificates \
2018-05-07 10:17:33 +00:00
git \
libffi-dev \
openssl \
openssl-dev \
2020-08-13 10:37:03 +00:00
postgresql-dev \
py3-mysqlclient \
py3-requests \
py3-pip \
python3 \
python3-dev && \
mkdir -p /opt && \
cd /opt/ && \
git clone --depth=1 https://gitlab.com/bontchev/elasticpot.git/ && \
cd elasticpot && \
pip3 install -r requirements.txt && \
2019-08-28 14:12:52 +00:00
#
# Setup user, groups and configs
addgroup -g 2000 elasticpot && \
2018-05-07 10:17:33 +00:00
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticpot && \
mv /root/dist/honeypot.cfg /opt/elasticpot/etc/ && \
2019-08-28 14:12:52 +00:00
#
# Clean up
apk del --purge build-base \
git \
libffi-dev \
openssl-dev \
2020-08-13 10:37:03 +00:00
postgresql-dev \
python3-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*
2019-08-28 14:12:52 +00:00
#
# Start elasticpot
2018-09-11 12:19:26 +00:00
STOPSIGNAL SIGINT
2018-03-31 15:18:28 +00:00
USER elasticpot:elasticpot
WORKDIR /opt/elasticpot/
CMD ["/usr/bin/python3","elasticpot.py"]