-
Notifications
You must be signed in to change notification settings - Fork 68
/
Dockerfile
51 lines (43 loc) · 1.53 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
# syntax=docker/dockerfile:1
ARG NDN_CXX_VERSION=latest
FROM ghcr.io/named-data/ndn-cxx-build:${NDN_CXX_VERSION} AS build
RUN apt-get install -Uy --no-install-recommends \
libpcap-dev \
&& 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
./waf build
./waf install
mkdir -p /deps/debian
touch /deps/debian/control
cd /deps
for binary in ndnpeek ndnpoke ndncatchunks ndnputchunks ndnping ndnpingserver ndndump ndn-dissect; do
dpkg-shlibdeps --ignore-missing-info "/usr/bin/${binary}" -O \
| sed -n 's|^shlibs:Depends=||p' | sed 's| ([^)]*),\?||g' > "${binary}"
done
EOF
FROM ghcr.io/named-data/ndn-cxx-runtime:${NDN_CXX_VERSION} AS ndn-tools
COPY --link --from=build /usr/bin/ndnpeek /usr/bin/
COPY --link --from=build /usr/bin/ndnpoke /usr/bin/
COPY --link --from=build /usr/bin/ndncatchunks /usr/bin/
COPY --link --from=build /usr/bin/ndnputchunks /usr/bin/
COPY --link --from=build /usr/bin/ndnping /usr/bin/
COPY --link --from=build /usr/bin/ndnpingserver /usr/bin/
COPY --link --from=build /usr/bin/ndndump /usr/bin/
COPY --link --from=build /usr/bin/ndn-dissect /usr/bin/
RUN --mount=from=build,source=/deps,target=/deps \
apt-get install -Uy --no-install-recommends \
$(cat /deps/ndn*) \
&& apt-get distclean
ENV HOME=/config
VOLUME /config
VOLUME /run/nfd