-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (17 loc) · 861 Bytes
/
Dockerfile
File metadata and controls
25 lines (17 loc) · 861 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
FROM rust:1.85-bookworm AS builder
WORKDIR /work
COPY Cargo.toml Cargo.lock ./
COPY crates ./crates
RUN cargo build --release -p allocdb-node --bin allocdb-k8s-layout --bin allocdb-local-cluster
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates libgcc-s1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /work/target/release/allocdb-k8s-layout /usr/local/bin/allocdb-k8s-layout
COPY --from=builder /work/target/release/allocdb-local-cluster /usr/local/bin/allocdb-local-cluster
COPY deploy/kubernetes/entrypoint.sh /usr/local/bin/allocdb-k8s-entrypoint
RUN chmod +x /usr/local/bin/allocdb-k8s-entrypoint \
&& mkdir -p /var/lib/allocdb /run/allocdb \
&& chown -R 65532:65532 /var/lib/allocdb /run/allocdb
USER 65532:65532
ENTRYPOINT ["/usr/local/bin/allocdb-k8s-entrypoint"]