-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
91 lines (80 loc) · 2.24 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
FROM golang:1.8
ENV SRC /usr/local
ENV LD_LIBRARY_PATH ${SRC}/lib
ENV PKG_CONFIG_PATH ${SRC}/lib/pkgconfig
RUN bash -c 'set -euo pipefail'
RUN apt-get update
RUN apt-get -y install \
autoconf \
automake \
build-essential \
git \
libass-dev \
libgpac-dev \
libmp3lame-dev \
libopus-dev \
libssl-dev \
libtheora-dev \
libtool \
libvorbis-dev \
openssl \
pkg-config \
texi2html \
wget \
yasm \
zlib1g-dev
# fdk-aac
RUN DIR=$(mktemp -d) && cd ${DIR} && \
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git && \
cd fdk-aac && \
autoreconf -fiv && \
./configure --prefix="${SRC}" --disable-shared && \
make && \
make install && \
make distclean && \
rm -rf ${DIR}
# nasm
RUN DIR=$(mktemp -d) && cd ${DIR} && \
wget http://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.bz2 && \
tar xjvf nasm-2.13.01.tar.bz2 && \
cd nasm-2.13.01 && \
./autogen.sh && \
./configure --prefix="${SRC}" --bindir="${SRC}/bin" && \
make && \
make install && \
make distclean && \
rm -rf ${DIR}
# libx264
RUN DIR=$(mktemp -d) && cd ${DIR} && \
git clone git://git.videolan.org/x264.git && \
cd x264 && \
./configure --enable-static --enable-shared && \
make && \
make install && \
ldconfig
# ffmpeg
RUN DIR=$(mktemp -d) && cd ${DIR} && \
git clone --depth 1 git://source.ffmpeg.org/ffmpeg && \
cd ffmpeg && \
./configure --prefix="${SRC}" --extra-cflags="-I${SRC}/include" --extra-ldflags="-L${SRC}/lib" --bindir="${SRC}/bin" \
--disable-debug --enable-small \
--disable-ffplay --disable-ffprobe --disable-ffserver \
--enable-gpl --enable-version3 --enable-nonfree \
--enable-openssl \
--enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus \
--enable-libtheora --enable-libvorbis --enable-libx264 && \
make && \
make install && \
make distclean && \
hash -r && \
rm -rf ${DIR}
RUN apt-get purge -y autoconf automake build-essential libtool make pkg-config yasm zlib1g-dev
RUN apt-get clean
RUN apt-get autoclean
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/libc.conf
RUN mkdir -p /go/src/app
WORKDIR /go/src/app
CMD ["go-wrapper", "run"]
ONBUILD COPY . /go/src/app
ONBUILD RUN go-wrapper download
ONBUILD RUN go-wrapper install