ptch it bro
This commit is contained in:
parent
9b033fb86e
commit
a71fe4bb28
4 changed files with 122 additions and 26 deletions
36
Dockerfile.transcode
Normal file
36
Dockerfile.transcode
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
FROM golang:1.23-alpine AS builder
|
||||
|
||||
ARG GO_TRANSCODE_COMMIT=f8137e68c7b8da88c51aec9563eec9585c10c723
|
||||
WORKDIR /src
|
||||
|
||||
RUN apk add --no-cache git
|
||||
RUN git clone https://github.com/m1k1o/go-transcode.git . \
|
||||
&& git checkout "$GO_TRANSCODE_COMMIT"
|
||||
|
||||
COPY patches/go-transcode-vaapi.patch /tmp/go-transcode-vaapi.patch
|
||||
RUN git apply /tmp/go-transcode-vaapi.patch \
|
||||
&& CGO_ENABLED=0 go build -o /go-transcode .
|
||||
|
||||
# Keep Alpine 3.17: upstream documents an FFmpeg 6 segmenting regression with
|
||||
# newer Alpine releases. Install both Intel and Mesa VAAPI drivers so this also
|
||||
# works if the Unraid host exposes an AMD render device.
|
||||
FROM alpine:3.17
|
||||
WORKDIR /app
|
||||
|
||||
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||
&& apk add --no-cache \
|
||||
bash \
|
||||
ffmpeg \
|
||||
intel-media-driver \
|
||||
libva-intel-driver \
|
||||
libva-utils \
|
||||
mesa-va-gallium
|
||||
|
||||
COPY --from=builder /go-transcode /app/go-transcode
|
||||
|
||||
EXPOSE 8080
|
||||
ENV TRANSCODE_BIND=:8080 \
|
||||
TRANSCODE_VAAPI_DEVICE=/dev/dri/renderD128
|
||||
|
||||
ENTRYPOINT ["/app/go-transcode"]
|
||||
CMD ["serve"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue