File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 44# Stage 1: Chef - prepares the build recipe
55FROM rust:1.94-slim-bookworm AS chef
66WORKDIR /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+
714RUN 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
2936COPY . .
3037RUN 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+
3249WORKDIR /app
3350
3451# Copy the binary
@@ -44,4 +61,4 @@ EXPOSE ${DEFAULT_PORT}
4461HEALTHCHECK --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" ]
You can’t perform that action at this time.
0 commit comments