Files
linearvoid/backend/playout/Dockerfile
T
zwitschi 8064e459f2
CD / deploy (push) Successful in 1m1s
CI / test (push) Successful in 1m43s
CI / docker (push) Failing after 24s
fix: playout Dockerfile use existing go.mod instead of init
2026-08-07 16:24:21 +02:00

33 lines
1.1 KiB
Docker

FROM golang:1.25-alpine AS builder
WORKDIR /app
COPY src/ ./src/
COPY src/go.mod src/go.sum ./
# Download dependencies and build
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -o /playlist-manager ./src/playlist.go
FROM alpine:3.20
# Install FFmpeg, curl for health checks, and basic tools
RUN apk add --no-cache \
ffmpeg \
curl \
bash
# Set working directory for playout
WORKDIR /app
# Create directories for playlist, media, HLS output, and emergency slate
RUN mkdir -p /app/hls /app/media /app/playlists /app/slate
# Copy the playout start script and the built playlist manager binary
COPY start-playout.sh /app/
# Copy demo data for out-of-the-box playout
COPY demodata/ /app/
# Copy the built playlist manager binary from the builder stage
COPY --from=builder /playlist-manager /app/playlist-manager
# Set execute permissions for the start script and playlist manager binary
RUN chmod +x /app/start-playout.sh /app/playlist-manager
# Expose HLS directory (will be served by nginx)
VOLUME ["/app/hls"]
# Default command runs the playout loop (which calls the Go validator)
CMD ["./start-playout.sh"]