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 COPY patches/go-vod-sheepflix.patch /tmp/go-vod-sheepflix.patch RUN git apply --check --directory=go-vod /tmp/go-vod-sheepflix.patch \ && git apply --directory=go-vod /tmp/go-vod-sheepflix.patch WORKDIR /src/go-vod RUN 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"]