-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (18 loc) · 699 Bytes
/
Dockerfile
File metadata and controls
23 lines (18 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM rust:alpine3.21 as builder
WORKDIR /app
COPY . ./
RUN apk update && \
apk add musl-dev jq && \
cargo build --release --message-format=json > build.json
# copy binary to a new location
RUN jq -r '.executable | select(. != null)' build.json | xargs -I '{}' cp '{}' /app
# final image
FROM alpine:latest
LABEL name="ssd-benchmark"
LABEL org.opencontainers.image.source="https://github.com/sassman/ssd-benchmark-rs"
LABEL repository="https://github.com/sassman/ssd-benchmark-rs"
LABEL homepage="https://github.com/sassman/ssd-benchmark-rs"
LABEL maintainer="Sven Kanoldt <[email protected]>"
COPY --from=builder /app/ssd-benchmark \
/usr/local/bin/
CMD /usr/local/bin/ssd-benchmark