mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
✨ 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:
23
relay.Dockerfile
Normal file
23
relay.Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user