Skip to content

Commit acddd82

Browse files
authored
misc: use cargo-chef 0.1.64 --bin flags (#1638)
* misc: Use cargo-chef 0.1.64 --bin flags for faster builds * nit: better dockerignore
1 parent 637b0f2 commit acddd82

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
**/target/
2+
**/.shuttle-executables
23
**/*Containerfile*
34
/examples
5+
.git
46
**/.cargo/
57
**/docker/
68
**/*.md

Containerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ RUN find . \( \
2727
\) -type f -exec install -D \{\} /build/\{\} \;
2828
WORKDIR /build
2929
RUN cargo chef prepare --recipe-path /recipe.json
30-
# TODO upstream: Reduce the cooking by allowing multiple --bin args to prepare, or like this https://github.com/LukeMathWalker/cargo-chef/issues/181
3130

3231

3332
# Builds crate according to cargo chef recipe.
@@ -39,7 +38,14 @@ COPY --from=chef-planner /recipe.json /
3938
RUN cargo chef cook \
4039
--all-features \
4140
$(if [ "$CARGO_PROFILE" = "release" ]; then echo --release; fi) \
42-
--recipe-path /recipe.json
41+
--recipe-path /recipe.json \
42+
--bin shuttle-auth \
43+
--bin shuttle-deployer \
44+
--bin shuttle-gateway \
45+
--bin shuttle-logger \
46+
--bin shuttle-provisioner \
47+
--bin shuttle-resource-recorder \
48+
--bin shuttle-next
4349
COPY --from=chef-planner /build .
4450
# Building all at once to share build artifacts in the "cook" layer
4551
RUN cargo build \

0 commit comments

Comments
 (0)