This repository has been archived by the owner on Dec 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
107 lines (100 loc) · 2.25 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Custom ffmpeg Dockerfile
# Versions:
# ffmpeg - git master HEAD
# libvmaf - 2.3.0
# libzimg - git master HEAD
# libopus - git master HEAD
# libx264 - git master HEAD
# libx265 - git master HEAD
# libsvtav1 - git master HEAD
# libaom - git master HEAD
# Use Debian for our base image
FROM docker.io/debian:stable-slim AS build
# Set the working directory to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
#--------------------------------
# Update and install dependencies
#--------------------------------
# No, we're not going to version every apt package dependency.
# That's a bad idea in practice and will cause problems.
# hadolint ignore=DL3008
RUN \
apt-get update && \
apt-get install -y \
--no-install-recommends \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
doxygen \
libasound2 \
libass-dev \
libfreetype6-dev \
libnuma-dev \
libtool-bin \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
ninja-build \
pkg-config \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
texinfo \
zlib1g-dev \
git-core \
nasm \
yasm && \
#--------------
# Install meson
#--------------
pip3 install --no-cache-dir meson==0.57.1 && \
#------------------
# Setup directories
#------------------
mkdir -p /input /output /ffmpeg/ffmpeg_sources && \
#-------------
# Build ffmpeg
#-------------
./build-ffmpeg.sh && \
#----------------------------------------------------
# Clean up directories and packages after compilation
#----------------------------------------------------
pip3 uninstall meson -y && \
apt-get purge -y \
autoconf \
automake \
build-essential \
ca-certificates \
cmake \
doxygen \
ninja-build \
pkg-config \
python3-pip \
python3-setuptools \
python3-wheel \
texinfo \
git-core \
nasm \
yasm && \
apt-get autoremove -y && \
apt-get install -y \
--no-install-recommends \
libsdl2-dev && \
apt-get clean && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /ffmpeg
#---------------------------------------
# Run ffmpeg when the container launches
#---------------------------------------
CMD ["ffmpeg"]