2017-11-06 20:17:00 +01:00
|
|
|
# Usage:
|
|
|
|
# docker run -d \
|
|
|
|
# --name=opensnitchd \
|
|
|
|
# --net host \
|
2017-11-08 19:16:51 +01:00
|
|
|
# --cap-add NET_ADMIN \
|
2017-11-06 20:17:00 +01:00
|
|
|
# r.j3ss.co/opensnitchd
|
|
|
|
#
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
2017-11-08 19:56:31 +01:00
|
|
|
bash \
|
2017-11-08 19:16:51 +01:00
|
|
|
iptables \
|
2017-11-06 20:22:25 +01:00
|
|
|
libcap \
|
|
|
|
libnetfilter_queue \
|
|
|
|
libnfnetlink \
|
|
|
|
python3 \
|
|
|
|
py3-gobject3 \
|
|
|
|
py3-qt5 \
|
|
|
|
tcpdump \
|
2017-11-08 19:56:31 +01:00
|
|
|
xtables-addons \
|
2017-11-06 20:22:25 +01:00
|
|
|
--repository https://dl-3.alpinelinux.org/alpine/edge/testing
|
2017-11-06 20:17:00 +01:00
|
|
|
|
2017-11-08 19:16:51 +01:00
|
|
|
ENV XTABLES_LIBDIR "/usr/lib/xtables"
|
2017-11-06 20:17:00 +01:00
|
|
|
ENV OPENSNITCH_VERSION master
|
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
build-base \
|
|
|
|
git \
|
|
|
|
libcap-dev \
|
|
|
|
libnetfilter_queue-dev \
|
|
|
|
libnfnetlink-dev \
|
|
|
|
python3-dev \
|
|
|
|
' \
|
|
|
|
set -x \
|
|
|
|
&& apk --no-cache add $buildDeps \
|
|
|
|
&& git clone --depth 1 --branch ${OPENSNITCH_VERSION} https://github.com/evilsocket/opensnitch.git /usr/src/opensnitch \
|
|
|
|
&& ( \
|
|
|
|
cd /usr/src/opensnitch \
|
|
|
|
&& python3 setup.py install \
|
|
|
|
&& rm -rf /usr/src/opensnitch \
|
|
|
|
) \
|
|
|
|
&& apk del $buildDeps \
|
|
|
|
&& echo "Build complete."
|
|
|
|
|
2017-11-08 19:16:51 +01:00
|
|
|
ENTRYPOINT ["/usr/bin/opensnitchd", "--debug"]
|