summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..d5f42a670
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+FROM ubuntu:22.04 AS builder
+
+WORKDIR /root
+RUN apt-get -y update && apt-get install -y --no-install-recommends autoconf automake build-essential ca-certificates wget unzip git make cmake pkg-config libpcap-dev autoconf libtool && apt-get clean
+RUN git clone https://github.com/utoni/nDPId.git
+
+WORKDIR /root/nDPId
+RUN cmake -S . -B build -DBUILD_NDPI=ON && cmake --build build --verbose
+
+FROM ubuntu:22.04
+USER root
+WORKDIR /
+
+COPY --from=builder /root/nDPId/build/nDPId /usr/sbin/nDPId
+COPY --from=builder /root/nDPId/build/nDPIsrvd /usr/bin/nDPIsrvd
+
+RUN apt-get -y update && apt-get install -y --no-install-recommends libpcap-dev && apt-get clean
+
+USER nobody
+RUN /usr/bin/nDPIsrvd -h || { RC=$?; test ${RC} -eq 1; }
+RUN /usr/sbin/nDPId -h || { RC=$?; test ${RC} -eq 1; }