diff --git a/docker/ciscoasa/Dockerfile b/docker/ciscoasa/Dockerfile index ffac1bc0..470a1e05 100644 --- a/docker/ciscoasa/Dockerfile +++ b/docker/ciscoasa/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.20 AS builder # # Install packages -RUN apk --no-cache add \ +RUN apk --no-cache -U add \ build-base \ git \ libffi \ diff --git a/docker/ddospot/Dockerfile b/docker/ddospot/Dockerfile index 0b579baa..701d6165 100644 --- a/docker/ddospot/Dockerfile +++ b/docker/ddospot/Dockerfile @@ -46,9 +46,9 @@ RUN pyinstaller ddospot.py \ --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 + --hidden-import twisted.python \ + --hidden-import OpenSSL.crypto \ + --hidden-import OpenSSL.SSL # FROM alpine:3.20 COPY --from=builder /opt/ddospot/ddospot/dist/ddospot/ /opt/ddospot/ddospot diff --git a/docker/elasticpot/Dockerfile b/docker/elasticpot/Dockerfile index 14185bc1..63504468 100644 --- a/docker/elasticpot/Dockerfile +++ b/docker/elasticpot/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.19 +FROM alpine:3.20 AS builder # # Include dist COPY dist/ /root/dist/ @@ -31,29 +31,23 @@ RUN apk --no-cache -U add \ mkdir -p /opt && \ cd /opt/ && \ git clone https://gitlab.com/bontchev/elasticpot.git/ && \ - cd elasticpot && \ - git checkout d12649730d819bd78ea622361b6c65120173ad45 && \ - cp /root/dist/requirements.txt . && \ - pip3 install --break-system-packages -r requirements.txt && \ + cd elasticpot && \ + git checkout d12649730d819bd78ea622361b6c65120173ad45 && \ + cp /root/dist/requirements.txt . +WORKDIR /opt/elasticpot +RUN pip3 install --break-system-packages pyinstaller +RUN pip3 install --break-system-packages -r requirements.txt +RUN pyinstaller elasticpot.py \ + --hidden-import output_plugins \ + --hidden-import output_plugins.jsonlog # -# Setup user, groups and configs - addgroup -g 2000 elasticpot && \ - adduser -S -H -s /bin/ash -u 2000 -D -g 2000 elasticpot && \ - mv /root/dist/honeypot.cfg /opt/elasticpot/etc/ && \ -# -# Clean up - apk del --purge build-base \ - git \ - libffi-dev \ - openssl-dev \ - postgresql-dev \ - python3-dev && \ - rm -rf /root/* \ - /var/cache/apk/* \ - /opt/elasticpot/.git +FROM alpine:3.20 +COPY --from=builder /opt/elasticpot/dist/ /opt/ +COPY --from=builder /opt/elasticpot/responses/ /opt/elasticpot/responses/ +COPY --from=builder /root/dist/honeypot.cfg /opt/elasticpot/etc/ # # Start elasticpot STOPSIGNAL SIGINT -USER elasticpot:elasticpot +USER 2000:2000 WORKDIR /opt/elasticpot/ -CMD ["/usr/bin/python3","elasticpot.py"] +CMD ["./elasticpot"]