nDPId/Dockerfile
Toni Uhlig b5bdcebbce
Some checks failed
ArchLinux PKGBUILD / build (push) Has been cancelled
CentOs / centos8 (push) Has been cancelled
FreeBSD Build / Build and Test (push) Has been cancelled
RPM Build / build (push) Has been cancelled
Build / macOS-14 cc (push) Has been cancelled
Build / ubuntu-latest clang (push) Has been cancelled
Build / ubuntu-latest clang-1 (push) Has been cancelled
Build / ubuntu-22.04 clang-12 (push) Has been cancelled
Build / ubuntu-latest gcc (push) Has been cancelled
Build / ubuntu-latest gcc-1 (push) Has been cancelled
Build / ubuntu-latest gcc-2 (push) Has been cancelled
Build / ubuntu-22.04 gcc-10 (push) Has been cancelled
Build / ubuntu-22.04 gcc-9 (push) Has been cancelled
SonarQube Scan / Build and analyze (push) Has been cancelled
Fixed (some) issues reported by SonarCloud
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
2026-05-14 16:57:38 +02:00

46 lines
2 KiB
Docker

FROM ubuntu:22.04 AS builder-ubuntu-2204
WORKDIR /root
RUN apt-get -y update \
&& apt-get install -y --no-install-recommends \
autoconf automake build-essential ca-certificates cmake git \
libcurl4-openssl-dev libdbus-1-dev libpcap-dev libtool make pkg-config unzip wget \
&& apt-get clean \
&& git clone https://github.com/utoni/nDPId.git
WORKDIR /root/nDPId
RUN cmake -S . -B build -DBUILD_NDPI=ON -DBUILD_EXAMPLES=ON \
-DENABLE_DBUS=ON -DENABLE_CURL=ON \
&& cmake --build build --verbose
FROM ubuntu:22.04
USER root
WORKDIR /
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPId /usr/sbin/nDPId
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPIsrvd /usr/bin/nDPIsrvd
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPId-test /usr/bin/nDPId-test
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPIsrvd-collectd /usr/bin/nDPIsrvd-collectd
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPIsrvd-captured /usr/bin/nDPIsrvd-captured
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPIsrvd-analysed /usr/bin/nDPIsrvd-anaylsed
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPIsrvd-analysed /usr/bin/nDPIsrvd-anaylsed
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPIsrvd-notifyd /usr/bin/nDPIsrvd-notifyd
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPIsrvd-influxd /usr/bin/nDPIsrvd-influxd
COPY --from=builder-ubuntu-2204 /root/nDPId/build/nDPIsrvd-simple /usr/bin/nDPIsrvd-simple
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; }; \
/usr/sbin/nDPId -h || { RC="$?"; test "${RC}" -eq 1; }
FROM archlinux:base-devel AS builder-archlinux
WORKDIR /root
RUN pacman --noconfirm -Sy cmake git unzip wget && mkdir /build && chown nobody /build && cd /build \
&& runuser -u nobody git clone https://github.com/utoni/nDPId.git
WORKDIR /build/nDPId/packages/archlinux
RUN runuser -u nobody makepkg