2024-11-19 23:48:06 +00:00
|
|
|
FROM alpine:3.20 AS builder
|
2021-07-09 23:16:19 +00:00
|
|
|
#
|
2022-03-12 14:42:34 +00:00
|
|
|
# Include dist
|
|
|
|
COPY dist/ /root/dist/
|
|
|
|
#
|
2021-07-09 23:16:19 +00:00
|
|
|
# Install packages
|
2022-03-05 00:50:47 +00:00
|
|
|
RUN apk --no-cache -U add \
|
2024-02-28 18:07:22 +00:00
|
|
|
build-base \
|
|
|
|
git \
|
|
|
|
py3-colorama \
|
|
|
|
py3-greenlet \
|
|
|
|
py3-pip \
|
|
|
|
py3-schedule \
|
|
|
|
py3-sqlalchemy \
|
|
|
|
py3-twisted \
|
|
|
|
py3-wheel \
|
|
|
|
python3 \
|
|
|
|
python3-dev && \
|
2021-07-09 23:16:19 +00:00
|
|
|
#
|
|
|
|
# Install ddospot from GitHub and setup
|
|
|
|
mkdir -p /opt && \
|
|
|
|
cd /opt/ && \
|
2024-11-19 23:48:06 +00:00
|
|
|
git clone https://github.com/t3chn0m4g3/ddospot && \
|
2021-07-09 23:16:19 +00:00
|
|
|
cd ddospot && \
|
2022-03-12 14:42:34 +00:00
|
|
|
cp /root/dist/requirements.txt . && \
|
2024-02-27 19:11:16 +00:00
|
|
|
pip3 install --break-system-packages -r ddospot/requirements.txt && \
|
2024-11-19 23:48:06 +00:00
|
|
|
pip3 install --break-system-packages pyinstaller
|
|
|
|
WORKDIR /opt/ddospot/ddospot
|
|
|
|
RUN pyinstaller ddospot.py \
|
|
|
|
--add-data "core:core" \
|
|
|
|
--hidden-import core \
|
|
|
|
--hidden-import cmd \
|
|
|
|
--hidden-import configparser \
|
|
|
|
--hidden-import colorama \
|
|
|
|
--hidden-import tabulate \
|
|
|
|
--hidden-import logging.handlers \
|
|
|
|
--hidden-import hpfeeds \
|
|
|
|
--hidden-import json \
|
|
|
|
--hidden-import http.server \
|
|
|
|
--hidden-import sys \
|
|
|
|
--hidden-import sqlalchemy \
|
|
|
|
--hidden-import sqlalchemy.ext.declarative \
|
|
|
|
--hidden-import schedule \
|
|
|
|
--hidden-import twisted \
|
|
|
|
--hidden-import twisted.internet \
|
|
|
|
--hidden-import twisted.internet.reactor \
|
|
|
|
--hidden-import twisted.names.client \
|
|
|
|
--hidden-import twisted.names.server \
|
|
|
|
--hidden-import=twisted.python \
|
|
|
|
--hidden-import=OpenSSL.crypto \
|
|
|
|
--hidden-import=OpenSSL.SSL
|
2021-07-09 23:16:19 +00:00
|
|
|
#
|
2024-11-19 23:48:06 +00:00
|
|
|
FROM alpine:3.20
|
|
|
|
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
|
2021-07-09 23:16:19 +00:00
|
|
|
#
|
|
|
|
# Start ddospot
|
|
|
|
STOPSIGNAL SIGINT
|
2024-11-19 23:48:06 +00:00
|
|
|
USER 2000:2000
|
|
|
|
WORKDIR /opt/ddospot/ddospot
|
|
|
|
CMD ["./ddospot", "-n"]
|