Skip to content

Commit

Permalink
Refactor dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen committed Sep 6, 2024
1 parent 609cd08 commit 816b8a5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
FROM rust:1-alpine AS chef
RUN rustup install 1.79.0
RUN rustup component add cargo clippy rust-docs rust-std rustc rustfmt

# Use apk for package management in Alpine
RUN apk add --no-cache build-base libressl-dev
RUN cargo install cargo-chef

FROM chef AS planner

WORKDIR /app
COPY . .
RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder

WORKDIR /app
COPY --from=planner /app/recipe.json recipe.json
# Build dependencies - this is the caching Docker layer!
RUN cargo chef cook --release --recipe-path recipe.json
# RUN cargo build --release -p prover
RUN cargo install --git https://github.com/lambdaclass/cairo-vm --rev 37ea72977dccbc2b90b8b7534c1edabd2e2fef79 cairo1-run

# Build application
COPY . .
ENV PATH="/root/.cargo/bin:${PATH}"

RUN cargo build --release -p prover
RUN cargo install --git https://github.com/lambdaclass/cairo-vm --rev 37ea72977dccbc2b90b8b7534c1edabd2e2fef79 cairo1-run

FROM ghcr.io/cartridge-gg/stone-prover:main AS prover

Expand Down

0 comments on commit 816b8a5

Please sign in to comment.