-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
123 lines (101 loc) · 3.3 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
FROM ampervue/python34
# https://github.com/ampervue/docker-python34-ffmpeg
MAINTAINER David Karchmer <[email protected]>
#####################################################################
#
# Image based on Ubuntu:14.04
#
# with
# - Python 3.4
# - FFMPEG (built)
#
# plus a bunch of build/web essentials via wheezy
# including MySQL and Postgres clients:
# https://github.com/docker-library/docs/tree/master/buildpack-deps
#
#####################################################################
ENV NUM_CORES 4
WORKDIR /usr/local/src
RUN git clone --depth 1 https://github.com/l-smash/l-smash \
&& git clone --depth 1 git://git.videolan.org/x264.git \
&& hg clone https://bitbucket.org/multicoreware/x265 \
&& git clone --depth 1 git://source.ffmpeg.org/ffmpeg \
&& git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git \
&& git clone --depth 1 https://chromium.googlesource.com/webm/libvpx \
&& git clone --depth 1 git://git.opus-codec.org/opus.git \
&& git clone --depth 1 https://github.com/mulx/aacgain.git
# Build L-SMASH
# =================================
WORKDIR /usr/local/src/l-smash
RUN ./configure \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libx264
# =================================
WORKDIR /usr/local/src/x264
RUN ./configure --enable-static \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libx265
# =================================
WORKDIR /usr/local/src/x265/build/linux
RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../../source \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libfdk-aac
# =================================
WORKDIR /usr/local/src/fdk-aac
RUN autoreconf -fiv \
&& ./configure --disable-shared \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libvpx
# =================================
WORKDIR /usr/local/src/libvpx
RUN ./configure --disable-examples \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build libopus
# =================================
WORKDIR /usr/local/src/opus
RUN ./autogen.sh \
&& ./configure --disable-shared \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Build ffmpeg.
# =================================
# --enable-libx265 - Remove until we can debug error
WORKDIR /usr/local/src/ffmpeg
RUN ./configure --extra-libs="-ldl" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfontconfig \
--enable-libfreetype \
--enable-libfribidi \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-nonfree \
--enable-openssl \
&& make -j ${NUM_CORES} \
&& make install
# =================================
# Remove all tmpfile
# =================================
WORKDIR /usr/local/
RUN rm -rf /usr/local/src
# =================================
# Setup a working directory to allow for
# docker run --rm -ti -v ${PWD}:/code ...
# =======================================
WORKDIR /work