Modify Dockerfile to work with git deps

This commit is contained in:
hu55a1n1 2024-02-26 03:49:08 -08:00
parent 256509a74b
commit 47c26da51e
2 changed files with 10 additions and 3 deletions

View file

@ -1,6 +1,10 @@
FROM gramineproject/gramine:v1.5 FROM gramineproject/gramine:v1.5
RUN apt-get update && apt-get install -y jq build-essential protobuf-compiler libprotobuf-dev RUN apt-get update && apt-get install -y jq build-essential protobuf-compiler libprotobuf-dev git
RUN mkdir /root/.ssh/ \
&& touch /root/.ssh/known_hosts \
&& ssh-keyscan github.com >> /root/.ssh/known_hosts
WORKDIR /workdir WORKDIR /workdir
@ -28,7 +32,9 @@ ENV SGX=$SGX
# Copy the quartz directory and build # Copy the quartz directory and build
COPY . ./quartz COPY . ./quartz
WORKDIR /workdir/quartz WORKDIR /workdir/quartz
RUN cargo build --release RUN mkdir -p .cargo/
RUN echo "net.git-fetch-with-cli = true" > .cargo/config.toml
RUN --mount=type=secret,id=ssh_id,target=/root/.ssh/id_ed25519 cargo build --release
WORKDIR /workdir WORKDIR /workdir
COPY quartz.manifest.template ./ COPY quartz.manifest.template ./

View file

@ -3,7 +3,8 @@
### Enclave usage ### Enclave usage
```bash ```bash
docker build . --tag quartz # docker build . --tag quartz
DOCKER_BUILDKIT=1 docker build --tag quartz --secret id=ssh_id,src=/home/hu55a1n1/.ssh/id_ed25519 .
docker run -it \ docker run -it \
--device /dev/sgx_enclave \ --device /dev/sgx_enclave \
--device /dev/sgx_provision \ --device /dev/sgx_provision \