-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.bench
More file actions
37 lines (26 loc) · 1.1 KB
/
Copy pathDockerfile.bench
File metadata and controls
37 lines (26 loc) · 1.1 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
32
33
34
35
36
37
# syntax=docker/dockerfile:1
#
# Prefer the shared Dockerfile:
# docker build --target bench-runtime -t sqe-bench:latest .
#
# This file exists for callers that still pass `-f Dockerfile.bench`.
ARG RUST_VERSION=1.97.1
FROM rust:${RUST_VERSION}-bookworm AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake protobuf-compiler libprotobuf-dev libssl-dev pkg-config clang lld \
&& rm -rf /var/lib/apt/lists/*
ENV RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=lld"
WORKDIR /build
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
COPY vendor/ vendor/
COPY xtask/ xtask/
RUN cargo build --release --locked --no-default-features --bin sqe-bench \
&& mkdir -p /build/out \
&& cp target/release/sqe-bench /build/out/
FROM cgr.dev/chainguard/glibc-dynamic@sha256:d49aa7837ef1ef8fae33917f94369294c6d49940d2f0b225beee65a3bb6747ed
USER 65532
LABEL org.opencontainers.image.title="sqe-bench" \
org.opencontainers.image.description="TPC benchmark data generator for SQE"
COPY --from=builder /build/out/sqe-bench /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/sqe-bench"]