-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from codecrafters-io/rust1.77
CC-1120: Rust 1.77 upgrade
- Loading branch information
Showing
4 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM rust:1.77-buster | ||
|
||
COPY Cargo.toml /app/Cargo.toml | ||
COPY Cargo.lock /app/Cargo.lock | ||
|
||
RUN mkdir /app/src | ||
RUN echo 'fn main() { println!("Hello World!"); }' > /app/src/main.rs | ||
|
||
WORKDIR /app | ||
RUN cargo build --release --target-dir=/tmp/codecrafters-grep-target | ||
|
||
RUN cargo clean -p grep-starter-rust --release --target-dir=/tmp/codecrafters-grep-target | ||
|
||
RUN rm -rf /app/src | ||
|
||
RUN echo "cd \${CODECRAFTERS_SUBMISSION_DIR} && cargo build --release --target-dir=/tmp/codecrafters-grep-target --manifest-path Cargo.toml" > /codecrafters-precompile.sh | ||
RUN chmod +x /codecrafters-precompile.sh | ||
|
||
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Cargo.toml,Cargo.lock" | ||
|
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
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