Redesign Dockerfiles using new ndn-cxx base images
Refs: #5303
Change-Id: I1a78db309e0443410f5b585f3b0318408e30f76d
diff --git a/tools/Dockerfile.nfd-status-http-server b/tools/Dockerfile.nfd-status-http-server
index 62545ac..179f9a6 100644
--- a/tools/Dockerfile.nfd-status-http-server
+++ b/tools/Dockerfile.nfd-status-http-server
@@ -1,12 +1,22 @@
-FROM ghcr.io/named-data/nfd:latest
+# syntax=docker/dockerfile:1
-RUN apt-get update \
- && apt-get install -y --no-install-recommends python3 \
+ARG NDN_CXX_VERSION=latest
+ARG NFD_VERSION=latest
+FROM ghcr.io/named-data/nfd-build:${NFD_VERSION} AS build
+
+FROM ghcr.io/named-data/ndn-cxx-runtime:${NDN_CXX_VERSION}
+
+RUN --mount=type=bind,from=build,source=/deps,target=/deps \
+ apt-get install -Uy --no-install-recommends $(cat /deps/nfdc) \
+ python3 \
&& rm -rf /var/lib/apt/lists/*
+COPY --link --from=build /usr/bin/nfdc /usr/bin/
+COPY --link --from=build /usr/bin/nfd-status-http-server /usr/bin/
+COPY --link --from=build /usr/share/ndn/ /usr/share/ndn/
+
VOLUME /run/nfd
EXPOSE 8080/tcp
-ENTRYPOINT ["/usr/bin/nfd-status-http-server"]
-CMD ["--address", "0.0.0.0", "--port", "8080"]
+ENTRYPOINT ["/usr/bin/nfd-status-http-server", "--address", "0.0.0.0"]