-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (41 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM ubuntu:24.04 AS builder
ARG CMAKE_ADDITIONNAL_ARGS
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
bison \
ca-certificates \
clang \
cmake \
flex \
ninja-build \
wget \
make \
&& rm -rf /var/lib/apt/lists/*
RUN set -x \
&& wget -qO- https://www.tcpdump.org/release/libpcap-1.10.4.tar.gz | tar xzf - \
&& mkdir libpcap-1.10.4/build \
&& cd libpcap-1.10.4/build \
&& ../configure \
--prefix=/usr \
--disable-shared \
--disable-usb \
--disable-bluetooth \
--disable-dbus \
--disable-rdma \
--disable-ipv6 \
--disable-optimizer-dbg \
--disable-yydebug \
&& make -j \
&& make install \
&& cd ../../ && rm -rf libpcap-1.10.4
WORKDIR /build
COPY CMakeLists.txt /build
COPY lib/ /build/lib
COPY sv_timestamp_logger.* /build/
RUN ls /build && \
mkdir build && cd build && \
cmake -G Ninja $CMAKE_ADDITIONNAL_ARGS .. && \
ninja sv_timestamp_logger
FROM ubuntu:24.04
COPY --from=builder /build/build/sv_timestamp_logger /usr/bin/sv_timestamp_logger
ENTRYPOINT ["/usr/bin/sv_timestamp_logger"]