-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
53 lines (40 loc) · 1.36 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# syntax=docker/dockerfile:1
ARG NDN_CXX_VERSION=latest
FROM ghcr.io/named-data/ndn-cxx-build:${NDN_CXX_VERSION} AS build
ARG JOBS
ARG SOURCE_DATE_EPOCH
RUN --mount=rw,target=/src <<EOF
set -eux
cd /src
./waf configure \
--prefix=/usr \
--libdir=/usr/lib \
--sysconfdir=/etc \
--localstatedir=/var \
--sharedstatedir=/var
./waf build
./waf install
EOF
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/
RUN apt-get install -Uy --no-install-recommends \
python3 \
&& apt-get distclean
ENV HOME=/config
VOLUME /config
VOLUME /etc/ndncert
VOLUME /run/nfd
ENTRYPOINT ["/usr/bin/ndncert-ca-server"]
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"]