| # 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 \ |
| RUN --mount=rw,target=/src <<EOF |
| touch /deps/debian/control |
| 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}" |
| 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 \ |