forked from Account-Link/teleport-gramine-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (25 loc) · 836 Bytes
/
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
FROM gramineproject/gramine:1.7-jammy AS builder
RUN apt-get update && apt-get install -y jq build-essential libclang-dev
WORKDIR /workdir
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup toolchain install 1.75.0
RUN gramine-sgx-gen-private-key
RUN apt-get install -y pkg-config libssl-dev
# Build just the dependencies (shorcut)
COPY Cargo.lock Cargo.toml ./
RUN mkdir src && echo "fn main() {}" > src/main.rs
RUN cargo build --release
RUN rm -r src
# Now add our actual source
COPY teleport.env Makefile ./
COPY src ./src
RUN rm src/bin/redeem.rs
COPY abi ./abi
COPY templates ./templates
# Build with rust
RUN cargo build --release
# Make and sign the gramine manifest
COPY exex.manifest.template ./
RUN make SGX=1 RA_TYPE=dcap
CMD [ "gramine-sgx-sigstruct-view exex.sig" ]