tpotce/docker/fatt/Dockerfile

42 lines
1 KiB
Text
Raw Normal View History

2019-05-31 17:52:39 +00:00
FROM alpine
# Include dist
#ADD dist/ /root/dist/
# Get and install dependencies & packages
RUN apk -U add \
git \
py3-libxml2 \
py3-lxml \
python3 \
python3-dev && \
apk -U add tshark --repository http://dl-3.alpinelinux.org/alpine/edge/community/ && \
# Setup user
addgroup -g 2000 fatt && \
adduser -S -s /bin/ash -u 2000 -D -g 2000 fatt && \
# Install fatt
2019-06-01 17:47:14 +00:00
mkdir -p /opt && \
cd /opt && \
2019-05-31 17:52:39 +00:00
git clone --depth=1 https://github.com/0x4D31/fatt && \
cd fatt && \
2019-06-01 17:47:14 +00:00
mkdir -p log && \
2019-05-31 17:52:39 +00:00
pip3 install --upgrade pip && \
pip3 install pyshark==0.4.2.2 && \
# Setup configs
2019-06-01 17:47:14 +00:00
chown fatt:fatt -R /opt/fatt/* && \
2019-05-31 17:52:39 +00:00
# Clean up
apk del --purge git \
python3-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*
# Start fatt
STOPSIGNAL SIGINT
2019-06-01 17:47:14 +00:00
ENV PYTHONPATH /opt/fatt
WORKDIR /opt/fatt
2019-05-31 17:52:39 +00:00
CMD python3 fatt.py -i $(/sbin/ip address | grep '^2: ' | awk '{ print $2 }' | tr -d [:punct:]) --print_output --json_logging -o log/fatt.log