Skip to content

Commit 96e724d

Browse files
author
root
committed
fix: add missing build deps to chef stage
- Add pkg-config and libssl-dev before cargo install cargo-chef - Fix malformed Dockerfile stages
1 parent 5488658 commit 96e724d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

backend/Dockerfile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
# Stage 1: Chef - prepares the build recipe
55
FROM rust:1.94-slim-bookworm AS chef
66
WORKDIR /usr/src/bunker
7+
8+
# Install dependencies needed for cargo-chef
9+
RUN apt-get update && apt-get install -y \
10+
pkg-config \
11+
libssl-dev \
12+
&& rm -rf /var/lib/apt/lists/*
13+
714
RUN cargo install cargo-chef
815

916
# Stage 2: Planner - generates the recipe.json
@@ -29,6 +36,16 @@ RUN cargo chef cook --release --recipe-path recipe.json
2936
COPY . .
3037
RUN cargo build --release
3138

39+
# Stage 4: Runtime
40+
FROM debian:bookworm-slim
41+
42+
# Install runtime dependencies
43+
RUN apt-get update && apt-get install -y \
44+
libssl3 \
45+
ca-certificates \
46+
curl \
47+
&& rm -rf /var/lib/apt/lists/*
48+
3249
WORKDIR /app
3350

3451
# Copy the binary
@@ -44,4 +61,4 @@ EXPOSE ${DEFAULT_PORT}
4461
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
4562
CMD curl -f http://localhost:${BUNKER_PORT}/health || exit 1
4663

47-
CMD ["bunker"]
64+
CMD ["bunker"]

0 commit comments

Comments
 (0)