-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
112 lines (97 loc) · 2.54 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
FROM debian:wheezy
MAINTAINER Ozzy Johnson <docker@ozzy.io>
ENV DEBIAN_FRONTEND noninteractive
# Update and install minimal.
RUN \
apt-get update \
--quiet \
&& apt-get install \
--yes \
--no-install-recommends \
--no-install-suggests \
autoconf \
automake \
build-essential \
ca-certificates \
git-core \
libass-dev \
libgpac-dev \
libtheora-dev \
libtool \
libvorbis-dev \
pkg-config \
python-minimal \
texi2html \
zlib1g-dev \
# Clean up packages.
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Prepare for cloning/building.
WORKDIR /tmp
## Yasm
RUN git clone git://github.com/yasm/yasm.git \
&& cd yasm \
&& ./autogen.sh \
&& ./configure \
&& make -j`getconf _NPROCESSORS_ONLN` \
&& make install \
&& make distclean \
&& cd /tmp \
&& rm -rf /tmp/yasm
## x264
RUN git clone git://git.videolan.org/x264.git \
&& cd x264 \
&& ./configure --enable-static --disable-opencl \
&& make -j`getconf _NPROCESSORS_ONLN` \
&& make install \
&& make distclean \
&& cd /tmp \
&& rm -rf /tmp/x264
## libopus
RUN git clone git://git.opus-codec.org/opus.git \
&& cd opus \
&& ./autogen.sh \
&& ./configure --disable-shared \
&& make -j`getconf _NPROCESSORS_ONLN` \
&& make install \
&& make distclean \
&& cd /tmp \
&& rm -rf /tmp/opus
## libvpx
RUN git clone https://chromium.googlesource.com/webm/libvpx \
&& cd libvpx \
&& ./configure --disable-shared \
&& make -j`getconf _NPROCESSORS_ONLN` \
&& make install \
&& make clean \
&& cd /tmp \
&& rm -rf /tmp/libvpx
## ffmpeg
RUN git clone git://source.ffmpeg.org/ffmpeg.git \
&& cd ffmpeg \
&& ./configure \
--disable-debug \
--enable-small \
--extra-libs=-ldl \
--enable-gpl \
--enable-libass \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
&& make -j`getconf _NPROCESSORS_ONLN` \
&& make install \
&& make distclean \
&& cd /tmp \
&& rm -rf /tmp/ffmpeg
# Access to second stream for consumption by ffserver or similar.
EXPOSE 8888
# Wrapper for ffmpeg to keep the container launch simple.
ADD record.sh /record.sh
# A volume for video output.
ONBUILD VOLUME ["/data"]
# Prepare to run.
WORKDIR /data
# Launch into the container executable style.
ENTRYPOINT ["/bin/bash", "/record.sh"]