Skip to content

Commit

Permalink
fix(auditor): use better build order for docker file
Browse files Browse the repository at this point in the history
This allows us to cache the layer where sqlx is installed in the case of
new dependencies.
  • Loading branch information
QuantumDancer committed Apr 11, 2024
1 parent 9c6f4fd commit 3b5091d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion containers/auditor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ COPY . .
RUN cargo chef prepare --recipe-path recipe.json

FROM chef as builder
COPY --from=planner /auditor/recipe.json recipe.json
# Install sqlx-cli
RUN cargo install --version=0.7.4 sqlx-cli --no-default-features --features postgres,rustls,sqlite

# Only build project dependencies
COPY --from=planner /auditor/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json

COPY . .
Expand Down

0 comments on commit 3b5091d

Please sign in to comment.