tpotce/docker/elk/map/Dockerfile

42 lines
1.1 KiB
Text
Raw Normal View History

2022-02-09 19:13:18 +00:00
FROM alpine:3.15
#
2022-02-12 01:04:02 +00:00
# Include dist
2022-03-08 23:36:03 +00:00
COPY dist/ /root/dist/
2022-02-12 01:04:02 +00:00
#
2022-02-09 19:13:18 +00:00
# Install packages
2022-03-08 23:36:03 +00:00
RUN apk -U --no-cache add \
2022-02-09 19:13:18 +00:00
build-base \
git \
libcap \
py3-pip \
python3 \
python3-dev && \
#
# Install Server from GitHub and setup
mkdir -p /opt && \
cd /opt/ && \
git clone https://github.com/t3chn0m4g3/geoip-attack-map && \
cd geoip-attack-map && \
# git checkout 4dae740178455f371b667ee095f824cb271f07e8 && \
2022-02-25 17:14:42 +00:00
cp /root/dist/* . && \
2022-02-09 19:13:18 +00:00
pip3 install -r requirements.txt && \
pip3 install flask && \
setcap cap_net_bind_service=+ep /usr/bin/python3.9 && \
#
# Setup user, groups and configs
addgroup -g 2000 map && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 map && \
chown map:map -R /opt/geoip-attack-map && \
#
# Clean up
apk del --purge build-base \
git \
python3-dev && \
2022-03-08 23:36:03 +00:00
rm -rf /root/* /var/cache/apk/* /opt/geoip-attack-map/.git
2022-02-09 19:13:18 +00:00
#
# Start wordpot
STOPSIGNAL SIGINT
USER map:map
WORKDIR /opt/geoip-attack-map
2022-02-14 00:30:18 +00:00
CMD ./entrypoint.sh && exec /usr/bin/python3 $MAP_COMMAND