Skip to content

Instantly share code, notes, and snippets.

@marttp
Created March 21, 2023 12:41
Show Gist options
  • Save marttp/b421528d1396f685b63054c821bb6036 to your computer and use it in GitHub Desktop.
Save marttp/b421528d1396f685b63054c821bb6036 to your computer and use it in GitHub Desktop.
Dockerfile for Axum
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