mirror of
https://github.com/flavioribeiro/donut.git
synced 2025-09-26 19:11:11 +08:00
simplify docker images
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# FFmpeg/libAV is fixed on version 5.1.2 because go-astiav binding supports it.
|
||||
# see https://github.com/asticode/go-astiav/issues/27
|
||||
FROM --platform=linux/amd64 jrottenberg/ffmpeg:5.1.2-ubuntu2004 AS base
|
||||
FROM jrottenberg/ffmpeg:5.1.4-ubuntu2204 AS base
|
||||
FROM golang:1.22
|
||||
|
||||
# TODO: copy only required files
|
||||
@@ -22,8 +22,6 @@ ENV CGO_CFLAGS="-I/usr/local/include/"
|
||||
ENV CGO_LDFLAGS="-L/usr/local/lib"
|
||||
|
||||
ENV WD=/usr/src/app
|
||||
ENV SRT_VERSION="v1.5.3"
|
||||
ENV SRT_FOLDER="/opt/srt_lib"
|
||||
WORKDIR ${WD}
|
||||
|
||||
RUN apt-get clean && apt-get update && \
|
||||
@@ -31,20 +29,7 @@ RUN apt-get clean && apt-get update && \
|
||||
tclsh pkg-config cmake libssl-dev build-essential git \
|
||||
&& apt-get clean
|
||||
|
||||
RUN \
|
||||
mkdir -p "${SRT_FOLDER}" && \
|
||||
git clone --depth 1 --branch "${SRT_VERSION}" https://github.com/Haivision/srt && \
|
||||
cd srt && \
|
||||
./configure --prefix=${SRT_FOLDER} $(configure) && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
ENV GOPROXY=direct
|
||||
# DO NOT ALTER THE ORDER OF THE FLAGS HERE, ffmpeg installs srt as well,
|
||||
# but we want to use the SRT we just built.
|
||||
ENV LD_LIBRARY_PATH="${SRT_FOLDER}/lib:$LD_LIBRARY_PATH"
|
||||
ENV CGO_CFLAGS="-I${SRT_FOLDER}/include/ ${CGO_CFLAGS}"
|
||||
ENV CGO_LDFLAGS="-L${SRT_FOLDER}/lib ${CGO_LDFLAGS}"
|
||||
|
||||
COPY . ./donut
|
||||
WORKDIR ${WD}/donut
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# FFmpeg/libAV is fixed on version 5.1.2 because go-astiav binding supports it.
|
||||
# see https://github.com/asticode/go-astiav/issues/27
|
||||
FROM --platform=linux/amd64 jrottenberg/ffmpeg:5.1.2-ubuntu2004 AS base
|
||||
FROM jrottenberg/ffmpeg:5.1.4-ubuntu2204 AS base
|
||||
FROM golang:1.22
|
||||
|
||||
# TODO: copy only required files
|
||||
@@ -22,28 +22,8 @@ ENV CGO_CFLAGS="-I/usr/local/include/"
|
||||
ENV CGO_LDFLAGS="-L/usr/local/lib"
|
||||
|
||||
ENV WD=/usr/src/app
|
||||
ENV SRT_VERSION="v1.5.3"
|
||||
ENV SRT_FOLDER="/opt/srt_lib"
|
||||
WORKDIR ${WD}
|
||||
|
||||
RUN apt-get clean && apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
tclsh pkg-config cmake libssl-dev build-essential git \
|
||||
&& apt-get clean
|
||||
|
||||
RUN \
|
||||
mkdir -p "${SRT_FOLDER}" && \
|
||||
git clone --depth 1 --branch "${SRT_VERSION}" https://github.com/Haivision/srt && \
|
||||
cd srt && \
|
||||
./configure --prefix=${SRT_FOLDER} $(configure) && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
ENV GOPROXY=direct
|
||||
# DO NOT ALTER THE ORDER OF THE FLAGS HERE, ffmpeg installs srt as well,
|
||||
# but we want to use the SRT we just built.
|
||||
ENV LD_LIBRARY_PATH="${SRT_FOLDER}/lib:$LD_LIBRARY_PATH"
|
||||
ENV CGO_CFLAGS="-I${SRT_FOLDER}/include/ ${CGO_CFLAGS}"
|
||||
ENV CGO_LDFLAGS="-L${SRT_FOLDER}/lib ${CGO_LDFLAGS}"
|
||||
|
||||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
|
Reference in New Issue
Block a user