tpotce/docker/ipphoney/Dockerfile

57 lines
1.2 KiB
Text
Raw Normal View History

2024-11-29 16:58:07 +00:00
FROM alpine:3.20 AS builder
2020-08-24 15:55:50 +00:00
#
# Include dist
2022-03-08 23:36:03 +00:00
COPY dist/ /root/dist/
2020-08-24 15:55:50 +00:00
#
# Install packages
2024-09-11 10:42:17 +00:00
RUN apk --no-cache -U add \
build-base \
ca-certificates \
git \
libcap \
libffi-dev \
openssl \
openssl-dev \
postgresql-dev \
py3-cryptography \
py3-elasticsearch \
py3-geoip2 \
py3-maxminddb \
py3-mysqlclient \
py3-requests \
py3-packaging \
py3-pip \
py3-psycopg2 \
py3-redis \
py3-requests \
py3-service_identity \
py3-setuptools \
py3-twisted \
2024-11-29 16:58:07 +00:00
py3-tz \
py3-wheel \
python3 \
python3-dev && \
2020-08-24 15:55:50 +00:00
mkdir -p /opt && \
cd /opt/ && \
2020-09-04 12:37:28 +00:00
git clone https://gitlab.com/bontchev/ipphoney.git/ && \
2020-08-24 15:55:50 +00:00
cd ipphoney && \
2024-11-29 16:58:07 +00:00
git checkout 9da0a9e7f9d839e4522f56b3bb2b790d87d65457 && \
cp /root/dist/requirements.txt .
WORKDIR /opt/ipphoney
RUN pip3 install --break-system-packages pyinstaller
RUN pip3 install --break-system-packages -r requirements.txt
RUN pyinstaller ipphoney.py \
--hidden-import output_plugins \
--hidden-import output_plugins.jsonlog
2020-08-24 15:55:50 +00:00
#
2024-11-29 16:58:07 +00:00
FROM alpine:3.20
COPY --from=builder /opt/ipphoney/dist/ /opt/
COPY --from=builder /opt/ipphoney/responses/ /opt/ipphoney/responses/
COPY dist/honeypot.cfg /opt/ipphoney/etc/
2020-08-24 15:55:50 +00:00
#
# Start ipphoney
STOPSIGNAL SIGINT
2024-11-29 16:58:07 +00:00
USER 2000:2000
2020-08-24 15:55:50 +00:00
WORKDIR /opt/ipphoney/
2024-11-29 16:58:07 +00:00
CMD ["./ipphoney"]