mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
update for py3.12, pyinstaller, harden image
This commit is contained in:
47
docker/ddospot/Dockerfile.old
Normal file
47
docker/ddospot/Dockerfile.old
Normal file
@ -0,0 +1,47 @@
|
||||
FROM alpine:3.20
|
||||
#
|
||||
# Include dist
|
||||
COPY dist/ /root/dist/
|
||||
#
|
||||
# Install packages
|
||||
RUN apk --no-cache -U add \
|
||||
build-base \
|
||||
git \
|
||||
libcap \
|
||||
py3-colorama \
|
||||
py3-greenlet \
|
||||
py3-pip \
|
||||
py3-schedule \
|
||||
py3-sqlalchemy \
|
||||
py3-twisted \
|
||||
py3-wheel \
|
||||
python3 \
|
||||
python3-dev && \
|
||||
#
|
||||
# Install ddospot from GitHub and setup
|
||||
mkdir -p /opt && \
|
||||
cd /opt/ && \
|
||||
git clone https://github.com/t3chn0m4g3/ddospot -b test && \
|
||||
cd ddospot && \
|
||||
cp /root/dist/requirements.txt . && \
|
||||
pip3 install --break-system-packages -r ddospot/requirements.txt && \
|
||||
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 ddospot && \
|
||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 ddospot && \
|
||||
chown ddospot:ddospot -R /opt/ddospot && \
|
||||
#
|
||||
# Clean up
|
||||
apk del --purge build-base \
|
||||
git \
|
||||
python3-dev && \
|
||||
rm -rf /root/* \
|
||||
/opt/ddospot/.git \
|
||||
/var/cache/apk/*
|
||||
#
|
||||
# Start ddospot
|
||||
STOPSIGNAL SIGINT
|
||||
USER ddospot:ddospot
|
||||
WORKDIR /opt/ddospot/ddospot/
|
||||
CMD ["/usr/bin/python3","ddospot.py", "-n"]
|
Reference in New Issue
Block a user