Skip to content

Instantly share code, notes, and snippets.

@soaxelbrooke
Created July 10, 2018 00:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soaxelbrooke/82f1ac107bc851f2633947feb7ccd8ef to your computer and use it in GitHub Desktop.
Save soaxelbrooke/82f1ac107bc851f2633947feb7ccd8ef to your computer and use it in GitHub Desktop.
A dockerfile for building minimal rust nightly containers
FROM rustlang/rust:nightly AS builder
WORKDIR /app
COPY src/ src/
COPY Cargo.* ./
RUN cargo build --release
FROM debian:stretch-slim
COPY --from=builder /app/target/release/api .
CMD ["./api"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment