mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-03 22:52:16 +00:00
Rewrite `libp2p-perf` protocol using `libp2p-request-response`. Additionally adjust to latest conventions, e.g. the final JSON output. Pull-Request: #3646.
19 lines
493 B
Docker
19 lines
493 B
Docker
# 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 \
|
|
mv ./target/release/perf /usr/local/bin/perf
|
|
|
|
FROM debian:bullseye-slim
|
|
|
|
COPY --from=builder /usr/local/bin/perf /app/perf
|
|
|
|
ENTRYPOINT [ "/app/perf" ]
|