Created
December 11, 2018 20:16
-
-
Save gugahoa/6e67d8b1a535b0729c3da62fe305d1aa 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 rust_base:latest | |
COPY src/ . | |
RUN cargo build |
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 rust:latest | |
RUN mkdir /opt/project_root -p | |
WORKDIR /opt/project_root | |
RUN useradd builder | |
RUN chown builder:builder /opt/project_root | |
USER builder | |
RUN USER=builder cargo init | |
COPY Cargo.toml . | |
RUN cargo fetch | |
RUN cargo build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment