Skip to content

Commit

Permalink
fix: make cargo chef detect binary
Browse files Browse the repository at this point in the history
  • Loading branch information
merklefruit committed Nov 8, 2024
1 parent be2e6b0 commit 23f726e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 0 additions & 5 deletions bolt-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "bolt"
version = "0.1.0"
edition = "2021"
default-run = "bolt"

[dependencies]
# async
Expand Down Expand Up @@ -41,7 +40,3 @@ tempfile = "3.13.0"

[build-dependencies]
tonic-build = "0.12.3"

[[bin]]
name = "bolt"
path = "./src/main.rs"
3 changes: 3 additions & 0 deletions bolt-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ FROM base AS planner
# Copy only Cargo files to cache dependencies
COPY Cargo.toml Cargo.lock ./

# Copy the main.rs file to allow cargo do detect a binary
COPY src/main.rs ./src/main.rs

# Prepare the recipe for caching dependencies (Cargo.toml/Cargo.lock)
RUN cargo chef prepare --recipe-path recipe.json

Expand Down

0 comments on commit 23f726e

Please sign in to comment.