-
Notifications
You must be signed in to change notification settings - Fork 154
/
Dockerfile
54 lines (47 loc) · 1.36 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
50
51
52
53
54
# syntax=docker/dockerfile:1
FROM ubuntu:24.04 AS build
RUN apt-get install -Uy --no-install-recommends \
dpkg-dev \
g++ \
git \
libboost-chrono-dev \
libboost-dev \
libboost-filesystem-dev \
libboost-log-dev \
libboost-program-options-dev \
libboost-stacktrace-dev \
libboost-thread-dev \
libsqlite3-dev \
libssl-dev \
pkgconf \
python3 \
&& apt-get distclean
ARG JOBS
ARG SOURCE_DATE_EPOCH
RUN --mount=rw,target=/src <<EOF
set -eux
cd /src
./waf configure \
--prefix=/usr \
--libdir=/usr/lib \
--sysconfdir=/etc \
--localstatedir=/var \
--sharedstatedir=/var \
--disable-static \
--enable-shared
./waf build
./waf install
mkdir -p /deps/debian
touch /deps/debian/control
cd /deps
dpkg-shlibdeps --ignore-missing-info /usr/lib/libndn-cxx.so.* /usr/bin/ndnsec -O \
| sed -n 's|^shlibs:Depends=||p' | sed 's| ([^)]*),\?||g' > ndn-cxx
EOF
FROM ubuntu:24.04 AS runtime
RUN --mount=from=build,source=/deps,target=/deps \
apt-get install -Uy --no-install-recommends \
$(cat /deps/ndn-cxx) \
&& apt-get distclean
RUN --mount=from=build,source=/usr,target=/build \
cp -av /build/lib/libndn-cxx.so.* /usr/lib/ \
&& cp -av /build/bin/ndnsec* /usr/bin/