Created
January 7, 2021 00:31
-
-
Save pwillis-els/08c1a25a58190106b0b931610f7cbee4 to your computer and use it in GitHub Desktop.
Dockerfile for building Rust applications with multi-stage builds
This file contains hidden or 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 as build | |
WORKDIR /build | |
COPY /src /build/src | |
COPY /man /build/man | |
COPY build.rs Cargo.toml /build/ | |
RUN cargo build --release | |
FROM debian:buster-slim | |
#RUN apt update && apt install libraries && apt clean all | |
COPY --from=build /build/target/release/main /main | |
ENTRYPOINT ["/main"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment