mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-20 06:02:24 +00:00
revert build changes, keep optimization
This commit is contained in:
parent
ef8e71007c
commit
646b0fddd3
2 changed files with 89 additions and 10 deletions
|
@ -6,34 +6,74 @@ COPY dist/ /root/dist/
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apk --no-cache -U add \
|
RUN apk --no-cache -U add \
|
||||||
build-base \
|
build-base \
|
||||||
|
freetds \
|
||||||
|
freetds-dev \
|
||||||
|
gcc \
|
||||||
|
git \
|
||||||
|
hiredis \
|
||||||
|
jpeg-dev \
|
||||||
libcap \
|
libcap \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
|
libpq \
|
||||||
musl-dev \
|
musl-dev \
|
||||||
openssl \
|
openssl \
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
|
postgresql-dev \
|
||||||
|
py3-chardet \
|
||||||
|
py3-click \
|
||||||
|
py3-cryptography \
|
||||||
|
py3-dnspython \
|
||||||
|
py3-flask \
|
||||||
|
py3-future \
|
||||||
|
py3-hiredis \
|
||||||
|
py3-itsdangerous \
|
||||||
|
py3-jinja2 \
|
||||||
|
py3-ldap3 \
|
||||||
|
py3-markupsafe \
|
||||||
|
py3-openssl \
|
||||||
|
py3-packaging \
|
||||||
py3-pip \
|
py3-pip \
|
||||||
|
py3-psycopg2 \
|
||||||
|
py3-pycryptodomex \
|
||||||
|
py3-werkzeug \
|
||||||
|
py3-wheel \
|
||||||
python3 \
|
python3 \
|
||||||
python3-dev && \
|
python3-dev \
|
||||||
|
zlib-dev && \
|
||||||
#
|
#
|
||||||
# Install honeypots from GitHub and setup
|
# Install honeypots from GitHub and setup
|
||||||
pip3 install --break-system-packages --no-cache-dir honeypots && \
|
mkdir -p /opt \
|
||||||
|
/var/log/honeypots && \
|
||||||
|
cd /opt/ && \
|
||||||
|
git clone https://github.com/t3chn0m4g3/honeypots && \
|
||||||
|
cd honeypots && \
|
||||||
|
pip3 install --break-system-packages --no-cache-dir . && \
|
||||||
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
|
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
|
||||||
#
|
#
|
||||||
# Setup user, groups and configs
|
# Setup user, groups and configs
|
||||||
mkdir -p /etc/honeypots/ && \
|
addgroup -g 2000 honeypots && \
|
||||||
cp /root/dist/config.json /etc/honeypots/ && \
|
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 honeypots && \
|
||||||
|
chown honeypots:honeypots -R /opt/honeypots && \
|
||||||
|
chown honeypots:honeypots -R /var/log/honeypots && \
|
||||||
|
mv /root/dist/config.json /opt/honeypots/ && \
|
||||||
#
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del --purge \
|
apk del --purge build-base \
|
||||||
build-base \
|
freetds-dev \
|
||||||
|
git \
|
||||||
|
jpeg-dev \
|
||||||
libffi-dev \
|
libffi-dev \
|
||||||
musl-dev \
|
|
||||||
openssl-dev \
|
openssl-dev \
|
||||||
|
postgresql-dev \
|
||||||
py3-pip \
|
py3-pip \
|
||||||
python3-dev && \
|
python3-dev \
|
||||||
|
zlib-dev && \
|
||||||
rm -rf /root/* \
|
rm -rf /root/* \
|
||||||
|
/var/cache/apk/* \
|
||||||
|
/opt/honeypots/.git
|
||||||
#
|
#
|
||||||
# Start honeypots
|
# Start honeypots
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
USER 2000:2000
|
USER honeypots:honeypots
|
||||||
CMD python3 -E -m honeypots --setup all --config /etc/honeypots/config.json
|
WORKDIR /opt/honeypots/
|
||||||
|
CMD python3 -E -m honeypots --setup all --config config.json
|
||||||
|
|
39
docker/honeypots/Dockerfile.testing
Normal file
39
docker/honeypots/Dockerfile.testing
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
FROM alpine:3.20
|
||||||
|
#
|
||||||
|
# Include dist
|
||||||
|
COPY dist/ /root/dist/
|
||||||
|
#
|
||||||
|
# Install packages
|
||||||
|
RUN apk --no-cache -U add \
|
||||||
|
build-base \
|
||||||
|
libcap \
|
||||||
|
libffi-dev \
|
||||||
|
musl-dev \
|
||||||
|
openssl \
|
||||||
|
openssl-dev \
|
||||||
|
py3-pip \
|
||||||
|
python3 \
|
||||||
|
python3-dev && \
|
||||||
|
#
|
||||||
|
# Install honeypots from GitHub and setup
|
||||||
|
pip3 install --break-system-packages --no-cache-dir honeypots && \
|
||||||
|
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
|
||||||
|
#
|
||||||
|
# Setup user, groups and configs
|
||||||
|
mkdir -p /etc/honeypots/ && \
|
||||||
|
cp /root/dist/config.json /etc/honeypots/ && \
|
||||||
|
#
|
||||||
|
# Clean up
|
||||||
|
apk del --purge \
|
||||||
|
build-base \
|
||||||
|
libffi-dev \
|
||||||
|
musl-dev \
|
||||||
|
openssl-dev \
|
||||||
|
py3-pip \
|
||||||
|
python3-dev && \
|
||||||
|
rm -rf /root/* \
|
||||||
|
#
|
||||||
|
# Start honeypots
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
|
USER 2000:2000
|
||||||
|
CMD python3 -E -m honeypots --setup all --config /etc/honeypots/config.json
|
Loading…
Reference in a new issue