diff --git a/Dockerfile b/Dockerfile index 72fc8809..360e1d88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,7 @@ -FROM golang:bullseye AS builder -WORKDIR /app -COPY . . -RUN CGO_ENABLED=0 go build -buildvcs=false -ldflags="-s -w" +FROM linuxserver/ffmpeg:latest -FROM ubuntu:22.04 -WORKDIR /app -ENV DEBIAN_FRONTEND=noninteractive -COPY ./build-ffmpeg.sh . -RUN bash ./build-ffmpeg.sh +COPY run.sh /go-vod.sh -COPY --from=builder /app/go-vod . EXPOSE 47788 -CMD ["/app/go-vod"] + +ENTRYPOINT ["/go-vod.sh"] diff --git a/build-ffmpeg-nvidia.sh b/build-ffmpeg-nvidia.sh index 29757acf..0bf9c1cd 100755 --- a/build-ffmpeg-nvidia.sh +++ b/build-ffmpeg-nvidia.sh @@ -2,7 +2,10 @@ set -e -# apt-get remove -y libva ffmpeg # not needed for Docker +# This script is intended for bare-metal installations. +# It builds ffmpeg and NVENC drivers from source. + +apt-get remove -y ffmpeg apt-get update apt-get install -y \ diff --git a/build-ffmpeg.sh b/build-ffmpeg.sh index ed37191b..221c859c 100755 --- a/build-ffmpeg.sh +++ b/build-ffmpeg.sh @@ -1,8 +1,11 @@ #!/bin/bash +# This script is intended for bare-metal installations. +# It builds ffmpeg and VA-API drivers from source. + set -e -# apt-get remove -y libva ffmpeg # not needed for Docker +apt-get remove -y libva ffmpeg apt-get update apt-get install -y \