Varun Patil | 794dcbd | 2024-05-05 16:12:48 -0700 | [diff] [blame] | 1 | # syntax=docker/dockerfile:1 |
| 2 | |
| 3 | ARG NDN_CXX_VERSION=latest |
| 4 | FROM ghcr.io/named-data/ndn-cxx-build:${NDN_CXX_VERSION} AS build |
| 5 | |
| 6 | ARG JOBS |
| 7 | ARG SOURCE_DATE_EPOCH |
| 8 | RUN --mount=rw,target=/src <<EOF |
| 9 | set -eux |
| 10 | cd /src |
| 11 | ./waf configure \ |
| 12 | --prefix=/usr \ |
| 13 | --libdir=/usr/lib \ |
| 14 | --sysconfdir=/etc \ |
| 15 | --localstatedir=/var \ |
| 16 | --sharedstatedir=/var |
| 17 | ./waf build |
| 18 | ./waf install |
| 19 | EOF |
| 20 | |
| 21 | |
Davide Pesavento | 6d00e0b | 2024-05-06 22:30:22 -0400 | [diff] [blame] | 22 | FROM ghcr.io/named-data/ndn-cxx-runtime:${NDN_CXX_VERSION} AS ca |
Varun Patil | 794dcbd | 2024-05-05 16:12:48 -0700 | [diff] [blame] | 23 | |
| 24 | COPY --link --from=build /usr/lib/libndn-cert.so.* /usr/lib/ |
| 25 | COPY --link --from=build /usr/bin/ndncert-ca-server /usr/bin/ |
| 26 | COPY --link --from=build /usr/bin/ndncert-ca-status /usr/bin/ |
| 27 | COPY --link --from=build /usr/bin/ndncert-send-email-challenge /usr/bin/ |
Varun Patil | 794dcbd | 2024-05-05 16:12:48 -0700 | [diff] [blame] | 28 | |
| 29 | RUN apt-get install -Uy --no-install-recommends \ |
| 30 | python3 \ |
| 31 | && apt-get distclean |
| 32 | |
| 33 | ENV HOME=/config |
| 34 | VOLUME /config |
| 35 | VOLUME /etc/ndncert |
| 36 | VOLUME /run/nfd |
| 37 | |
| 38 | ENTRYPOINT ["/usr/bin/ndncert-ca-server"] |
Davide Pesavento | 6d00e0b | 2024-05-06 22:30:22 -0400 | [diff] [blame] | 39 | CMD ["-c", "/config/ndncert-ca.conf"] |
| 40 | |
| 41 | |
| 42 | FROM ghcr.io/named-data/ndn-cxx-runtime:${NDN_CXX_VERSION} AS client |
| 43 | |
| 44 | COPY --link --from=build /usr/lib/libndn-cert.so.* /usr/lib/ |
| 45 | COPY --link --from=build /usr/bin/ndncert-client /usr/bin/ |
| 46 | COPY --link --from=build /etc/ndncert/client.conf.sample /config/ndncert-client.conf |
| 47 | |
| 48 | ENV HOME=/config |
| 49 | VOLUME /config |
| 50 | VOLUME /run/nfd |
| 51 | |
| 52 | ENTRYPOINT ["/usr/bin/ndncert-client"] |
| 53 | CMD ["-c", "/config/ndncert-client.conf"] |