-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 793 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (25 loc) · 793 Bytes
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
32
# Build stage
FROM rust:1-slim-bookworm AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
pkg-config \
ca-certificates \
libzstd1 \
&& rm -rf /var/lib/apt/lists/*
COPY Cargo.toml Cargo.lock ./
COPY ingest-router ./ingest-router
COPY locator ./locator
COPY proxy ./proxy
COPY synapse ./synapse
COPY shared ./shared
RUN cargo build --release
RUN mkdir /stage /synapse-cache && cp --parents /usr/lib/$(gcc -print-multiarch)/libzstd.so.1 /stage
# Runtime stage
FROM gcr.io/distroless/cc-debian13:nonroot
WORKDIR /app
COPY --from=builder /app/target/release/synapse synapse
COPY --from=builder /stage/ /
COPY --from=builder --chown=nonroot:nonroot /synapse-cache /tmp/synapse-cache
ENTRYPOINT ["/app/synapse"]
CMD []