-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (35 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
42 lines (35 loc) · 1.04 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
# Setup base
FROM golang:1.26.0 AS base
WORKDIR /app
COPY ./go.mod ./
COPY ./go.sum ./
RUN go mod download
COPY cmd/ ./cmd/
COPY twitch/ ./twitch/
COPY utils/ ./utils/
# Setup builder
FROM base AS builder
RUN go build -o /stream ./cmd/main.go
# Run using Chromium image with FFmpeg support
FROM linuxserver/chromium:latest AS runner
# Install FFmpeg and runtime dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
xvfb \
x11-utils \
pulseaudio \
pulseaudio-utils \
alsa-utils \
libasound2-plugins \
dbus \
&& rm -rf /var/lib/apt/lists/*
# Create directories for audio configs
RUN mkdir -p /root/.config/pulse /var/run/pulse /var/run/dbus
# Copy startup script
COPY start.sh /start.sh
RUN chmod +x /start.sh
# Copy app binary
COPY --from=builder /stream /stream
# Set environment variables (DISPLAY will be set dynamically in start.sh)
ENV PULSE_RUNTIME_PATH=/var/run/pulse
ENTRYPOINT ["/start.sh"]