diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2023-10-16 20:38:54 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2023-10-16 20:38:54 +0200 |
commit | e134eef5bbffcafbbe73f4510d57647383555cf4 (patch) | |
tree | 9bb81c9ad861d0d5b61889c23b2486842fbf1fdf /Dockerfile | |
parent | d29efd4d7ce1cdb4b54aec2450dd4801729afd07 (diff) |
Fixed Dockerfile related SonarCloud issues.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile index f9e8f224f..bce898961 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,20 @@ FROM ubuntu:22.04 as builder WORKDIR /root -RUN env DEBIAN_FRONTEND=noninteractive apt-get -y update && apt-get install -y wget unzip git make cmake pkg-config libpcap-dev autoconf libtool +RUN env DEBIAN_FRONTEND=noninteractive 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 RUN git clone https://github.com/utoni/nDPId.git RUN cd nDPId && mkdir -p build && cd build && cmake .. -DBUILD_NDPI=ON && make FROM ubuntu:22.04 -WORKDIR /root -RUN apt-get -y update && apt-get -y install libpcap-dev +USER root +WORKDIR / + +COPY --from=builder /root/nDPId/build/nDPId /usr/sbin/nDPId +COPY --from=builder /root/nDPId/build/nDPIsrvd /usr/bin/nDPIsrvd + +RUN env DEBIAN_FRONTEND=noninteractive apt-get -y update && apt-get install -y --no-install-recommends libpcap-dev -COPY --from=builder /root/nDPId/libnDPI/ /root/ -COPY --from=builder /root/nDPId/build/nDPIsrvd /root/nDPId/build/nDPId /root/ +USER nobody +RUN /usr/bin/nDPIsrvd -h || { RC=$?; test ${RC} -eq 1; } +RUN /usr/sbin/nDPId -h || { RC=$?; test ${RC} -eq 1; } |