Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: use cargo-chef 0.1.64 --bin flags #1638

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
**/target/
**/.shuttle-executables
**/*Containerfile*
/examples
.git
**/.cargo/
**/docker/
**/*.md
Expand Down
11 changes: 8 additions & 3 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ RUN find . \( \
\) -type f -exec install -D \{\} /build/\{\} \;
WORKDIR /build
RUN cargo chef prepare --recipe-path /recipe.json
# TODO upstream: Reduce the cooking by allowing multiple --bin args to prepare, or like this https://github.com/LukeMathWalker/cargo-chef/issues/181


# Builds crate according to cargo chef recipe.
Expand All @@ -39,13 +38,19 @@ COPY --from=chef-planner /recipe.json /
RUN cargo chef cook \
--all-features \
$(if [ "$CARGO_PROFILE" = "release" ]; then echo --release; fi) \
--recipe-path /recipe.json
--recipe-path /recipe.json \
--bin shuttle-auth \
--bin shuttle-deployer \
--bin shuttle-gateway \
--bin shuttle-logger \
--bin shuttle-provisioner \
--bin shuttle-resource-recorder \
--bin shuttle-next
COPY --from=chef-planner /build .
# Building all at once to share build artifacts in the "cook" layer
RUN cargo build \
$(if [ "$CARGO_PROFILE" = "release" ]; then echo --release; fi) \
--bin shuttle-auth \
# --bin shuttle-builder \
--bin shuttle-deployer \
--bin shuttle-gateway \
--bin shuttle-logger \
Expand Down