blob: 63e9aa5e882d4954799f07f594fd6cab2eb4f481 [file] [log] [blame]
Varun Patil6ba08cd2023-11-18 13:54:52 -08001FROM ghcr.io/named-data/ndn-cxx:latest as builder
2
3RUN apt-get update \
4 && apt-get install -y --no-install-recommends libpcap-dev \
5 && rm -rf /var/lib/apt/lists/*
6
7COPY . /NFD
8
9RUN cd /NFD \
10 && ./waf configure --without-pch --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
11 && ./waf \
12 && ./waf install \
13 # get list of dependencies
14 && mkdir -p /shlibdeps/debian && cd /shlibdeps && touch debian/control \
15 && dpkg-shlibdeps --ignore-missing-info /usr/lib/libndn-cxx.so* /usr/bin/nfdc /usr/bin/nfd \
16 && sed -n '/^shlibs:Depends=/ s|shlibs:Depends=||p' debian/substvars | sed -e 's|,||g' -e 's| ([^)]*)||g' > /deps.txt
17
18# use same base distro version as named-data/ndn-cxx
19FROM debian:bookworm
20
21COPY --from=builder /deps.txt /
22RUN apt-get update \
23 && apt-get install -y --no-install-recommends $(cat /deps.txt) \
24 && rm -rf /var/lib/apt/lists/* /deps.txt
25
26COPY --from=builder /usr/lib/libndn-cxx.so* /usr/lib/
27COPY --from=builder /usr/bin/nfd /usr/bin/
28COPY --from=builder /usr/bin/nfdc /usr/bin/
29
Varun Patil23135a42023-11-18 15:12:42 -080030COPY --from=builder /usr/bin/nfd-status-http-server /usr/bin/
31COPY --from=builder /usr/share/ndn/ /usr/share/ndn/
32
Varun Patil6ba08cd2023-11-18 13:54:52 -080033VOLUME /config
34VOLUME /run/nfd
35
36EXPOSE 6363/tcp
37EXPOSE 6363/udp
38EXPOSE 9696/tcp
39
40ENTRYPOINT ["/usr/bin/nfd"]
41CMD ["--config", "/config/nfd.conf"]