-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 1.47 KB
/
Copy pathDockerfile
File metadata and controls
31 lines (23 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# ââ Stage 1: build ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
FROM rust:1.82-slim AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . .
# Build the release binary in one layer so CI cache is maximally effective.
RUN cargo build --release --bin sentinel
# ââ Stage 2: runtime âââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
FROM debian:bookworm-slim AS runtime
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
openssh-client \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/sentinel /usr/local/bin/sentinel
# Operators override these at runtime â never bake keys into the image.
ENV ANTHROPIC_API_KEY="" \
OPENAI_API_KEY="" \
RUST_LOG="info"
ENTRYPOINT ["sentinel"]
CMD ["--help"]