-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (23 loc) · 801 Bytes
/
Dockerfile
File metadata and controls
27 lines (23 loc) · 801 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
# syntax=docker/dockerfile:1.6
ARG RUST_VERSION=1.90
ARG CHEF_IMAGE=lukemathwalker/cargo-chef:latest-rust-${RUST_VERSION}-bookworm
FROM ${CHEF_IMAGE} AS planner
WORKDIR /app
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM ${CHEF_IMAGE} AS builder
WORKDIR /app
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --locked --recipe-path recipe.json
COPY . .
RUN cargo build --release --locked \
&& strip target/release/geyserbench
FROM gcr.io/distroless/cc-debian12:nonroot AS runtime
ARG APP=/usr/local/bin/geyserbench
WORKDIR /home/nonroot
COPY --from=builder /app/target/release/geyserbench ${APP}
COPY config.toml /etc/geyserbench/config.example.toml
USER nonroot
ENV RUST_LOG=info
VOLUME ["/home/nonroot"]
ENTRYPOINT ["/usr/local/bin/geyserbench"]