29 lines
964 B
Text
29 lines
964 B
Text
FROM golang:1.23-bookworm AS builder
|
|
|
|
ARG MEMORIES_COMMIT=951b79a38f5f6438c956b98d63f760fdb4cd6c50
|
|
WORKDIR /src
|
|
|
|
RUN git clone https://github.com/pulsejet/memories.git . \
|
|
&& git checkout "$MEMORIES_COMMIT"
|
|
|
|
WORKDIR /src/go-vod
|
|
COPY patches/go-vod-sheepflix.patch /tmp/go-vod-sheepflix.patch
|
|
RUN git apply /tmp/go-vod-sheepflix.patch \
|
|
&& gofmt -w transcoder/handler.go transcoder/stream.go \
|
|
&& CGO_ENABLED=0 go build -ldflags="-s -w" -o /go-vod .
|
|
|
|
# go-vod itself uses Jellyfin's FFmpeg distribution. Pin the stable Jellyfin
|
|
# runtime so driver/codec behavior does not change unexpectedly on rebuild.
|
|
FROM jellyfin/jellyfin:10.11.11
|
|
USER root
|
|
|
|
RUN ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/local/bin/ffmpeg \
|
|
&& ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/local/bin/ffprobe
|
|
|
|
COPY --from=builder /go-vod /app/go-vod
|
|
COPY govod-config.json /app/config.json
|
|
|
|
EXPOSE 8080
|
|
ENV LIBVA_DRIVER_NAME=i965
|
|
|
|
ENTRYPOINT ["/app/go-vod", "/app/config.json"]
|