forked from Phala-Network/phala-blockchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gramine.Dockerfile
48 lines (32 loc) · 992 Bytes
/
gramine.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
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND='noninteractive'
ADD dockerfile.d/01_apt_gramine.sh /root
RUN bash /root/01_apt_gramine.sh
ADD dockerfile.d/02_pip.sh /root
RUN bash /root/02_pip.sh
ADD ./dockerfile.d/03_sdk.sh /root
RUN bash /root/03_sdk.sh
ARG CODENAME='focal'
ADD ./dockerfile.d/04_psw.sh /root
RUN bash /root/04_psw.sh
ARG RUST_TOOLCHAIN='nightly-2022-09-08'
ADD ./dockerfile.d/05_rust.sh /root
RUN bash /root/05_rust.sh
WORKDIR /root
# ====== build pruntime ======
RUN mkdir phala-blockchain
ADD . phala-blockchain
RUN mkdir prebuilt
RUN cd phala-blockchain/standalone/pruntime/gramine-build && \
PATH=$PATH:/root/.cargo/bin make dist PREFIX=/root/prebuilt && \
make clean && \
rm -rf /root/.cargo/registry && \
rm -rf /root/.cargo/git
# ====== clean up ======
RUN rm -rf phala-blockchain
ADD dockerfile.d/cleanup.sh .
RUN bash cleanup.sh
# ====== start phala ======
ADD dockerfile.d/startup-gramine.sh ./startup.sh
CMD bash ./startup.sh
EXPOSE 8000