mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
tweaking, cleanup
This commit is contained in:
@ -4,7 +4,8 @@ FROM alpine:3.20 AS builder
|
||||
COPY dist/ /root/dist/
|
||||
#
|
||||
# Install packages
|
||||
RUN apk --no-cache -U add \
|
||||
RUN apk --no-cache -U upgrade && \
|
||||
apk --no-cache -U add \
|
||||
build-base \
|
||||
git \
|
||||
py3-colorama \
|
||||
@ -22,6 +23,7 @@ RUN apk --no-cache -U add \
|
||||
cd /opt/ && \
|
||||
git clone https://github.com/t3chn0m4g3/ddospot && \
|
||||
cd ddospot && \
|
||||
git checkout 66b94f3cf56c66e2e26b55feff9e65493cfadf3c && \
|
||||
cp /root/dist/requirements.txt . && \
|
||||
pip3 install --break-system-packages -r ddospot/requirements.txt && \
|
||||
pip3 install --break-system-packages pyinstaller
|
||||
@ -51,6 +53,7 @@ RUN pyinstaller ddospot.py \
|
||||
--hidden-import OpenSSL.SSL
|
||||
#
|
||||
FROM alpine:3.20
|
||||
RUN apk --no-cache -U upgrade
|
||||
COPY --from=builder /opt/ddospot/ddospot/dist/ddospot/ /opt/ddospot/ddospot
|
||||
COPY --from=builder /opt/ddospot/ddospot/global.conf /opt/ddospot/ddospot/
|
||||
COPY --from=builder /opt/ddospot/ddospot/pots /opt/ddospot/ddospot/pots
|
||||
|
@ -1,47 +0,0 @@
|
||||
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