rust-libp2p/misc/server/Dockerfile
Max Inden e974efb755
feat: add rust-libp2p-server to monorepo
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.
2023-08-21 18:49:42 +00:00

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"]