From 816b8a563e27af13ba4e9eaaf3e6dd169d390c4d Mon Sep 17 00:00:00 2001 From: steebchen Date: Fri, 6 Sep 2024 12:56:55 -0400 Subject: [PATCH] Refactor dockerfile --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c119227..478f232 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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