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
|
|
|
|
#
|
2017-11-08 20:16:31 +01:00
|
|
|
FROM debian:sid
|
2017-11-06 20:17:00 +01:00
|
|
|
|
2018-02-04 02:32:22 +01:00
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
|
|
RUN mkdir -p /etc/xdg/QtProject && \
|
|
|
|
apt-get update && apt-get install -y \
|
2017-11-08 20:16:31 +01:00
|
|
|
ca-certificates \
|
2017-11-08 19:16:51 +01:00
|
|
|
iptables \
|
2017-11-08 20:16:31 +01:00
|
|
|
libcap2 \
|
|
|
|
libnetfilter-queue1 \
|
|
|
|
libnfnetlink0 \
|
2017-11-06 20:22:25 +01:00
|
|
|
python3 \
|
2017-11-08 20:16:31 +01:00
|
|
|
python3-dbus \
|
|
|
|
python3-dev \
|
|
|
|
python3-gi \
|
|
|
|
python3-pyinotify \
|
|
|
|
python3-pyqt5 \
|
|
|
|
python3-setuptools \
|
2017-11-06 20:22:25 +01:00
|
|
|
tcpdump \
|
2017-11-08 20:16:31 +01:00
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
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=' \
|
2017-11-08 20:16:31 +01:00
|
|
|
build-essential \
|
|
|
|
git \
|
2017-11-06 20:17:00 +01:00
|
|
|
libcap-dev \
|
2017-11-08 20:16:31 +01:00
|
|
|
libnetfilter-queue-dev \
|
2017-11-06 20:17:00 +01:00
|
|
|
libnfnetlink-dev \
|
|
|
|
python3-dev \
|
|
|
|
' \
|
|
|
|
set -x \
|
2017-11-08 20:16:31 +01:00
|
|
|
&& apt-get update && apt-get install -y \
|
|
|
|
$buildDeps \
|
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2017-11-06 20:17:00 +01:00
|
|
|
&& 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 \
|
|
|
|
) \
|
2017-11-08 20:16:31 +01:00
|
|
|
&& apt-get purge -y $buildDeps \
|
2017-11-06 20:17:00 +01:00
|
|
|
&& echo "Build complete."
|
|
|
|
|
2017-11-08 20:16:31 +01:00
|
|
|
ENTRYPOINT ["/usr/local/bin/opensnitchd", "--debug"]
|