Skip to content

Instantly share code, notes, and snippets.

@sbeckeriv
Last active February 8, 2020 00:10
Show Gist options
  • Save sbeckeriv/8a5bd6df2c00cdf3d84c95a72fb5f3e2 to your computer and use it in GitHub Desktop.
Save sbeckeriv/8a5bd6df2c00cdf3d84c95a72fb5f3e2 to your computer and use it in GitHub Desktop.
Rust Rocket Docker slim
FROM rustlang/rust:nightly-slim
WORKDIR /app
COPY ./ /app
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
pkg-config \
libssl-dev
RUN cargo build --release
# match nightly slim
FROM debian:buster-slim
WORKDIR /app
COPY --from=0 /app/target/release/rocket-webhook .
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
libssl-dev
CMD ["/app/rocket-webhook"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment