Last active
February 8, 2020 00:10
-
-
Save sbeckeriv/8a5bd6df2c00cdf3d84c95a72fb5f3e2 to your computer and use it in GitHub Desktop.
Rust Rocket Docker slim
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 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