mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-15 20:31:19 +00:00
Moves https://github.com/mxinden/rust-libp2p-server to the rust-libp2p monorepository. > # Rust libp2p Server > > A rust-libp2p based server implementation running: > > - the [Kademlia protocol](https://github.com/libp2p/specs/tree/master/kad-dht) > > - the [Circuit Relay v2 protocol](https://github.com/libp2p/specs/blob/master/relay/circuit-v2.md) > > - the [AutoNAT protocol](https://github.com/libp2p/specs/blob/master/autonat/README.md) Pull-Request: #4311.
17 lines
541 B
Docker
17 lines
541 B
Docker
FROM rust:1.66-bullseye as builder
|
|
WORKDIR /usr/src/rust-libp2p-server
|
|
|
|
# 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-server
|
|
|
|
RUN --mount=type=cache,target=./target \
|
|
mv ./target/release/libp2p-server /usr/local/bin/libp2p-server
|
|
|
|
FROM gcr.io/distroless/cc
|
|
COPY --from=builder /usr/local/bin/libp2p-server /usr/local/bin/libp2p-server
|
|
CMD ["libp2p-server"]
|