-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
64 lines (49 loc) · 1.8 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# target build source: https://github.com/markus-perl/ffmpeg-build-script/blob/v1.48/Dockerfile
ARG BASE_IMAGE=ubuntu:22.04@sha256:77906da86b60585ce12215807090eb327e7386c8fafb5402369e421f44eff17e
FROM ${BASE_IMAGE} AS build
ARG FFMPEG_BUILD_SCRIPT_VERSION=1.48
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
build-essential \
curl \
ca-certificates \
libva-dev \
python3 \
python-is-python3 \
ninja-build \
meson \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
&& update-ca-certificates
WORKDIR /app
# ADD doesn't cache when used from URL
RUN curl -sLO \
https://raw.githubusercontent.com/markus-perl/ffmpeg-build-script/v${FFMPEG_BUILD_SCRIPT_VERSION}/build-ffmpeg && \
chmod 755 ./build-ffmpeg && \
SKIPINSTALL=yes ./build-ffmpeg \
--build \
--enable-gpl-and-non-free && \
rm -rf packages && \
find workspace -mindepth 1 -maxdepth 1 -type d ! -name 'bin' -exec rm -rf {} \; && \
find workspace/bin -mindepth 1 -maxdepth 1 -type f ! -name 'ff*' -exec rm -f {} \;
FROM debian:trixie-20240110-slim as base
RUN apt-get update \
&& apt-get install -y \
ca-certificates \
mkvtoolnix \
libva-drm2 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /app/workspace/bin/ff* /usr/bin/
# Check shared library
RUN ldd /usr/bin/ffmpeg && \
ldd /usr/bin/ffprobe && \
ldd /usr/bin/ffplay
FROM base as server
COPY ./dist/gearr-server /app/gearr-server
ENTRYPOINT ["/app/gearr-server"]
FROM base as worker
COPY ./dist/gearr-worker /app/gearr-worker
ENTRYPOINT ["/app/gearr-worker"]
FROM tentacule/pgstosrt as worker-pgs
COPY ./dist/gearr-worker /app/gearr-worker
ENTRYPOINT ["/app/gearr-worker"]