Skip to content

Commit

Permalink
cd: include review changes + add chef planner
Browse files Browse the repository at this point in the history
  • Loading branch information
0xGabi committed Mar 29, 2023
1 parent 2ae272d commit e4fa133
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
FROM rust:1.68.1 AS builder
RUN apt-get update && apt-get -y upgrade
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
WORKDIR app

FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json

FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN cargo build --release
RUN cargo build --release --bin blob-indexer


FROM debian:buster-slim
COPY --from=builder ./target/release/blob-indexer ./target/release/blob-indexer
CMD ["/target/release/blob-indexer"]
FROM debian:bullseye-slim AS runtime
WORKDIR app
COPY --from=builder /app/target/release/blob-indexer /usr/local/bin
ENTRYPOINT ["/usr/local/bin/blob-indexer"]

0 comments on commit e4fa133

Please sign in to comment.