Skip to content

Commit

Permalink
Dockerfile update
Browse files Browse the repository at this point in the history
 * gitlab-ci runner fix (single runner / multiple jobs)

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
  • Loading branch information
utoni committed Nov 18, 2024
1 parent 0a4f3cb commit 442900b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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; }

0 comments on commit 442900b

Please sign in to comment.