2023-03-19 19:20:42 +01:00
|
|
|
# syntax=docker/dockerfile:1.5-labs
|
|
|
|
FROM rust:1.67.0 as builder
|
|
|
|
|
|
|
|
# Run with access to the target cache to speed up builds
|
|
|
|
WORKDIR /workspace
|
|
|
|
ADD . .
|
|
|
|
RUN --mount=type=cache,target=./target \
|
|
|
|
--mount=type=cache,target=/usr/local/cargo/registry \
|
|
|
|
cargo build --release --package libp2p-perf
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=./target \
|
2023-05-28 07:51:53 +02:00
|
|
|
mv ./target/release/perf /usr/local/bin/perf
|
2023-03-19 19:20:42 +01:00
|
|
|
|
|
|
|
FROM debian:bullseye-slim
|
|
|
|
|
2023-05-28 07:51:53 +02:00
|
|
|
COPY --from=builder /usr/local/bin/perf /app/perf
|
2023-03-19 19:20:42 +01:00
|
|
|
|
2023-05-28 07:51:53 +02:00
|
|
|
ENTRYPOINT [ "/app/perf" ]
|