aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2024-11-18 14:44:44 +0100
committerToni Uhlig <matzeton@googlemail.com>2024-11-18 14:44:44 +0100
commit442900bc14a591ac11f2fc0c6e7c7936b4f3298a (patch)
tree1cacc7359c84721a1d04cd3ddee2d70ef2a289e2
parent0a4f3cb0c8b1e94f4f0e8032e96706fbe6b645de (diff)
Dockerfile update
* gitlab-ci runner fix (single runner / multiple jobs) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--Dockerfile19
2 files changed, 13 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a46093761..612997508 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,7 +4,7 @@ stages:
- build_and_test
variables:
- GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_CONCURRENT_ID/$CI_PROJECT_PATH
+ GIT_CLONE_PATH: '$CI_BUILDS_DIR/$CI_JOB_ID/$CI_PROJECT_NAME'
before_script:
- export DEBIAN_FRONTEND=noninteractive
diff --git a/Dockerfile b/Dockerfile
index b79579498..be322d160 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,13 +1,16 @@
FROM ubuntu:22.04 AS builder
WORKDIR /root
-RUN apt-get -y update && apt-get install -y --no-install-recommends \
+RUN apt-get -y update \
+ && apt-get install -y --no-install-recommends \
autoconf automake build-essential ca-certificates cmake git \
- libpcap-dev libtool make pkg-config unzip wget && apt-get clean
-RUN git clone https://github.com/utoni/nDPId.git
+ 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 && cmake --build build --verbose
+RUN cmake -S . -B build -DBUILD_NDPI=ON \
+ && cmake --build build --verbose
FROM ubuntu:22.04
USER root
@@ -16,8 +19,10 @@ 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
+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; }
+RUN /usr/bin/nDPIsrvd -h || { RC=$?; test ${RC} -eq 1; }; \
+ /usr/sbin/nDPId -h || { RC=$?; test ${RC} -eq 1; }