blob: 9df2752c43c37b622c6d339800a9f5c4a7dda274 [file] [log] [blame]
Varun Patil35e6aff2024-05-04 14:14:06 -07001# syntax=docker/dockerfile:1
2
3ARG NDN_CXX_VERSION=latest
4FROM ghcr.io/named-data/ndn-cxx-build:${NDN_CXX_VERSION} AS build
5
6RUN apt-get install -Uy --no-install-recommends \
7 libpcap-dev \
8 && apt-get distclean
9
10ARG JOBS
11ARG SOURCE_DATE_EPOCH
12RUN --mount=rw,target=/src <<EOF
13 set -eux
14 cd /src
15 ./waf configure \
16 --prefix=/usr \
17 --libdir=/usr/lib \
18 --sysconfdir=/etc \
19 --localstatedir=/var \
20 --sharedstatedir=/var
21 ./waf build
22 ./waf install
23 mkdir -p /deps/debian
24 touch /deps/debian/control
25 cd /deps
Davide Pesavento9907cc12025-04-20 23:30:06 -040026 for binary in ndndissect ndndump ndnget ndnpeek ndnpoke ndnping ndnpingserver ndnserve; do
Varun Patil35e6aff2024-05-04 14:14:06 -070027 dpkg-shlibdeps --ignore-missing-info "/usr/bin/${binary}" -O \
28 | sed -n 's|^shlibs:Depends=||p' | sed 's| ([^)]*),\?||g' > "${binary}"
29 done
30EOF
31
32
33FROM ghcr.io/named-data/ndn-cxx-runtime:${NDN_CXX_VERSION} AS ndn-tools
34
Davide Pesavento9907cc12025-04-20 23:30:06 -040035COPY --link --from=build /usr/bin/ndndissect /usr/bin/
Davide Pesavento8ca94572025-04-20 14:52:00 -040036COPY --link --from=build /usr/bin/ndndump /usr/bin/
Davide Pesavento0b6e1db2025-04-19 19:23:11 -040037COPY --link --from=build /usr/bin/ndnget /usr/bin/
Varun Patil35e6aff2024-05-04 14:14:06 -070038COPY --link --from=build /usr/bin/ndnpeek /usr/bin/
39COPY --link --from=build /usr/bin/ndnpoke /usr/bin/
Varun Patil35e6aff2024-05-04 14:14:06 -070040COPY --link --from=build /usr/bin/ndnping /usr/bin/
41COPY --link --from=build /usr/bin/ndnpingserver /usr/bin/
Davide Pesavento8ca94572025-04-20 14:52:00 -040042COPY --link --from=build /usr/bin/ndnserve /usr/bin/
Varun Patil35e6aff2024-05-04 14:14:06 -070043
44RUN --mount=from=build,source=/deps,target=/deps \
Davide Pesavento5b71cfa2024-06-07 17:44:06 -040045 apt-get install -Uy --no-install-recommends \
46 $(cat /deps/ndn*) \
Varun Patil35e6aff2024-05-04 14:14:06 -070047 && apt-get distclean
48
49ENV HOME=/config
50VOLUME /config
51VOLUME /run/nfd