Created
March 21, 2023 12:41
-
-
Save marttp/b421528d1396f685b63054c821bb6036 to your computer and use it in GitHub Desktop.
Dockerfile for Axum
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
FROM rust:1.68.0 as builder | |
WORKDIR /app | |
COPY ./Cargo.lock ./Cargo.lock | |
COPY ./Cargo.toml ./Cargo.toml | |
COPY ./src ./src | |
RUN cargo build --release | |
RUN rm src/*.rs | |
# The final base image | |
FROM debian:buster-slim | |
COPY --from=builder /app/target/release/perf-rust /usr/src/app | |
CMD ["/usr/src/app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment