-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
344 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
FROM lukemathwalker/cargo-chef:latest AS chef | ||
WORKDIR /app | ||
|
||
# Install system dependencies | ||
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config | ||
|
||
# Prepare build plan | ||
FROM chef AS planner | ||
COPY ./Cargo.toml ./Cargo.lock ./ | ||
COPY ./src ./src | ||
RUN cargo chef prepare | ||
|
||
# Build application | ||
FROM chef AS builder | ||
COPY --from=planner /app/recipe.json . | ||
RUN cargo chef cook --release | ||
COPY . . | ||
RUN cargo build --release | ||
|
||
FROM debian:stable-slim AS runtime | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/target/release/rollup-boost /usr/local/bin/ | ||
|
||
ENTRYPOINT ["/usr/local/bin/rollup-boost"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.