docker: split CA and client into two separate targets
Change-Id: I62ad850f0415e2e161e00fb75ff2d25536888458
diff --git a/Dockerfile b/Dockerfile
index 8a83c9b..f364da1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,13 +19,12 @@
EOF
-FROM ghcr.io/named-data/ndn-cxx-runtime:${NDN_CXX_VERSION} AS ndncert
+FROM ghcr.io/named-data/ndn-cxx-runtime:${NDN_CXX_VERSION} AS ca
COPY --link --from=build /usr/lib/libndn-cert.so.* /usr/lib/
COPY --link --from=build /usr/bin/ndncert-ca-server /usr/bin/
COPY --link --from=build /usr/bin/ndncert-ca-status /usr/bin/
COPY --link --from=build /usr/bin/ndncert-send-email-challenge /usr/bin/
-COPY --link --from=build /usr/bin/ndncert-client /usr/bin/
RUN apt-get install -Uy --no-install-recommends \
python3 \
@@ -37,4 +36,18 @@
VOLUME /run/nfd
ENTRYPOINT ["/usr/bin/ndncert-ca-server"]
-CMD ["-c", "/config/ca.conf"]
+CMD ["-c", "/config/ndncert-ca.conf"]
+
+
+FROM ghcr.io/named-data/ndn-cxx-runtime:${NDN_CXX_VERSION} AS client
+
+COPY --link --from=build /usr/lib/libndn-cert.so.* /usr/lib/
+COPY --link --from=build /usr/bin/ndncert-client /usr/bin/
+COPY --link --from=build /etc/ndncert/client.conf.sample /config/ndncert-client.conf
+
+ENV HOME=/config
+VOLUME /config
+VOLUME /run/nfd
+
+ENTRYPOINT ["/usr/bin/ndncert-client"]
+CMD ["-c", "/config/ndncert-client.conf"]