dockerfile: swith to inheriting build

monorepo
Varun Patil 2023-10-20 15:02:59 -07:00
parent 899098bc51
commit edbcaaa064
3 changed files with 12 additions and 13 deletions

View File

@ -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"]

View File

@ -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 \

View File

@ -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 \