-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce caching for dockerfile (#10)
* Update Dockerfile to optimize layer caching by separate copying of Cargo files and source code * Update Dockerfile to correct slackwatch binary path * Update Docker build-push-action to v5 and enable cache in dev-build workflow * Update Docker build-push-action to v5 and enable cache in dev-build workflow * Update Docker build-push-action to v5 and enable cache in dev-build workflow * Update GitHub Actions workflow to use latest checkout and buildx actions, and enhance caching strategy * Rename GitHub workflow for clarity on dev builds * Remove unused file, also testing build time from changes * Update Docker cache settings in GitHub Actions dev-build workflow * Remove commented out code and clean up main function in main.rs * Move dioxus-cli installation before copying source files in Dockerfile * Move dioxus-cli installation before copying source files in Dockerfile * Enable Docker build caching for Slackwatch workflow
- Loading branch information
1 parent
3459cf5
commit 5a85953
Showing
5 changed files
with
12 additions
and
78 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
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 |
---|---|---|
@@ -1,13 +1,14 @@ | ||
FROM rust:1.77.1 as builder | ||
WORKDIR /app | ||
COPY . . | ||
RUN cargo install [email protected] | ||
COPY Cargo.toml Cargo.lock ./ | ||
COPY src ./src | ||
RUN dx build --platform fullstack --release | ||
|
||
FROM rust:1.77.1 | ||
#RUN apt-get update && rm -rf /var/lib/apt/lists/* | ||
#Copy all files from the builder | ||
WORKDIR /app | ||
COPY --from=builder /app/slackwatch /app/slackwatch | ||
COPY --from=builder /app/target/release/slackwatch /app/slackwatch | ||
EXPOSE 8080 | ||
CMD ["/app/slackwatch/slackwatch"] |
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 was deleted.
Oops, something went wrong.