-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathenclave.Dockerfile
55 lines (42 loc) · 1.91 KB
/
enclave.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
54
55
FROM node:16-alpine3.18
ENV DATA_PLANE_EXECUTABLE_PATH=/data-plane
ENV DATA_PLANE_SERVICE_PATH=/etc/service/data-plane
ENV START_EV_SERVICES_PATH=/etc/service/ev-services-entrypoint
RUN apk update &&\
apk add runit && apk add curl && \
rm -rf /var/cache/apk/*
RUN apk add iptables
COPY ./target/x86_64-unknown-linux-musl/release/data-plane $DATA_PLANE_EXECUTABLE_PATH
RUN chmod +x $DATA_PLANE_EXECUTABLE_PATH
RUN mkdir $DATA_PLANE_SERVICE_PATH
COPY ./e2e-tests/scripts/start-data-plane.sh $DATA_PLANE_SERVICE_PATH/run
RUN chmod +x $DATA_PLANE_SERVICE_PATH/run
ENV PCR0 000
ENV PCR1 000
ENV PCR2 000
ENV PCR8 000
# CERTS FOR CERT PROVISIONER
ARG MOCK_CERT_PROVISIONER_CLIENT_CERT
ARG MOCK_CERT_PROVISIONER_CLIENT_KEY
ARG MOCK_CERT_PROVISIONER_ROOT_CERT
ARG MOCK_CERT_PROVISIONER_SERVER_KEY
ARG MOCK_CERT_PROVISIONER_SERVER_CERT
ENV MOCK_CERT_PROVISIONER_CLIENT_CERT $MOCK_CERT_PROVISIONER_CLIENT_CERT
ENV MOCK_CERT_PROVISIONER_CLIENT_KEY $MOCK_CERT_PROVISIONER_CLIENT_KEY
ENV MOCK_CERT_PROVISIONER_ROOT_CERT $MOCK_CERT_PROVISIONER_ROOT_CERT
ENV MOCK_CERT_PROVISIONER_SERVER_KEY $MOCK_CERT_PROVISIONER_SERVER_KEY
ENV MOCK_CERT_PROVISIONER_SERVER_CERT $MOCK_CERT_PROVISIONER_SERVER_CERT
# USE HTTP OR WS CUSTOMER SERVER
ARG CUSTOMER_PROCESS=httpCustomerProcess.js
COPY ./e2e-tests/sample-ca/* /services/
COPY ./e2e-tests/$CUSTOMER_PROCESS /services/$CUSTOMER_PROCESS
COPY ./e2e-tests/package.json /services/package.json
COPY ./e2e-tests/package-lock.json /services/package-lock.json
RUN cd services && npm i
RUN mkdir /etc/service/customer_process \
&& /bin/sh -c "echo -e '"'#!/bin/sh\nexec /customer_process/customer_process ${CUSTOMER_PROCESS}\n'"' > /etc/service/customer_process/run" \
&& chmod +x /etc/service/customer_process/run
RUN mkdir /customer_process
COPY ./e2e-tests/scripts/start_customer_process /customer_process/customer_process
RUN chmod +x /customer_process/customer_process
CMD ["runsvdir", "/etc/service"]