-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (62 loc) · 2.24 KB
/
Copy pathDockerfile
File metadata and controls
70 lines (62 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# syntax=docker/dockerfile:1
FROM lukemathwalker/cargo-chef:latest-rust-bookworm AS chef
WORKDIR /app
RUN apt update && apt install lld clang -y
FROM chef AS planner
COPY . .
# Compute a lock-like file for our project
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Update default packages
RUN apt-get update
# Get Ubuntu packages
RUN apt-get install -y \
build-essential \
curl \
pkg-config
# Get GStreamer-related packages
RUN apt-get install -y libssl-dev \
libunwind-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-qt5 \
gstreamer1.0-pulseaudio \
gstreamer1.0-nice
WORKDIR /app
COPY --from=planner /app/recipe.json recipe.json
# Build our project dependencies, not our application!
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
# Build our application
RUN cargo build --release
# Runtime image.
#
# srt-whep no longer compiles in its own WebRTC sink; it loads `whipclientsink`
# from whichever `rswebrtc` plugin the GStreamer installation provides (see
# docs/adr/0003 and docs/adr/0004). No Debian/Ubuntu apt package ships that
# plugin, so the plain gstreamer1.0-plugins-* set used before this base leaves
# `whipclientsink` missing and every viewer branch fails. livekit/gstreamer's
# `-prod-rs` image bundles gst-plugins-rs (libgstrswebrtc.so) in the default
# plugin path, alongside the SRT, tsdemux and RTP elements the pipeline needs.
#
# The builder above compiles against GStreamer 1.22 (bookworm); GStreamer keeps
# a stable ABI across the 1.x series, so that binary runs on this newer 1.26
# runtime. The binary itself is version-agnostic about rswebrtc — it resolves
# the element by name at runtime — so only the core GStreamer/glib ABI matters.
FROM livekit/gstreamer:1.26.7-prod-rs AS runtime
WORKDIR /app
COPY --from=builder /app/target/release/srt-whep ./srt-whep
ENV GST_DEBUG=1
ENTRYPOINT [ "./srt-whep" ]