From aa06f6076200d2d1b9adb2a8cc481e2bd491fa63 Mon Sep 17 00:00:00 2001 From: Wanjohi <71614375+wanjohiryan@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:05:25 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20relay=20docker=20imag?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- relay.Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 relay.Dockerfile diff --git a/relay.Dockerfile b/relay.Dockerfile new file mode 100644 index 00000000..af8ff2c4 --- /dev/null +++ b/relay.Dockerfile @@ -0,0 +1,23 @@ +#Git clone kixelated's moq-rs then build the moq-relay and push it to the final image +#Copied from https://github.com/kixelated/moq-rs/blob/main/Dockerfile +FROM rust:bookworm as builder + +WORKDIR /build + +RUN apt-get install -y git + +RUN git clone https://github.com/kixelated/moq-rs . + +RUN --mount=type=cache,target=/usr/local/cargo/registry \ + --mount=type=cache,target=/build/target \ + cargo build --release && cp /build/target/release/moq-* /usr/local/cargo/bin + +FROM debian:bookworm-slim + +RUN apt-get update && \ + apt-get install -y --no-install-recommends ca-certificates curl libssl3 && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=builder /usr/local/cargo/bin/moq-relay /usr/local/bin + +CMD ["moq-relay"] \ No newline at end of file