| # syntax=docker/dockerfile:1 |
| FROM ubuntu:24.04 AS build |
| RUN apt-get install -Uy --no-install-recommends \ |
| libboost-program-options-dev \ |
| libboost-stacktrace-dev \ |
| RUN --mount=rw,target=/src <<EOF |
| touch /deps/debian/control |
| 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 |
| FROM ubuntu:24.04 AS runtime |
| RUN --mount=from=build,source=/deps,target=/deps \ |
| apt-get install -Uy --no-install-recommends \ |
| RUN --mount=from=build,source=/usr,target=/build \ |
| cp -av /build/lib/libndn-cxx.so.* /usr/lib/ \ |
| && cp -av /build/bin/ndnsec* /usr/bin/ |