feat: Add relay docker image (#1)

## Description

**What(what issue does this code solve/what feature does it add):**

We are adding the `Dockerfile` to build a moq-relay

**How(how does it solve it):**

1. Added `relay.Dockerfile` with all the docker code to build
kixelated's moq-relay.
2. Added `relay.yml` in workflows for building and publishing the docker
image

## Required Checklist:

- [ ] I have added any necessary documentation and comments in my code
(where appropriate)
- [ ] I have added tests to make sure my code runs in all contexts

## Further comments
This commit is contained in:
Wanjohi
2024-03-29 09:40:29 +03:00
committed by GitHub
parent 601c268a39
commit 7d5d8be14b
3 changed files with 132 additions and 10 deletions

23
relay.Dockerfile Normal file
View File

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