Last active
June 15, 2018 13:40
-
-
Save terry90/61eca5c3955335bcc560c9bdc90db828 to your computer and use it in GitHub Desktop.
This file contains 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 as build | |
# Dependencies cache | |
WORKDIR /app/ | |
COPY Cargo.toml . | |
COPY Cargo.lock . | |
RUN mkdir src | |
RUN echo "fn main() {}" > src/main.rs | |
RUN apt-get update && apt-get install -y pkg-config libssl-dev && apt-get clean | |
RUN cargo build --release | |
# End dependencies cache | |
COPY . . | |
RUN touch src/main.rs | |
RUN cargo test | |
RUN cargo build --release | |
FROM debian:jessie | |
WORKDIR /app/ | |
RUN apt-get update && apt-get install -y openssl && apt-get clean | |
RUN apt-cache search ssl | |
COPY --from=build app/target/release/ox /ox | |
CMD ["/ox"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment