-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
81 lines (66 loc) · 2.17 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
# ffmpeg - http://ffmpeg.org/download.html
#
# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
#
FROM amazonlinux:2 AS base
MAINTAINER Giuseppe Battista <[email protected]>
WORKDIR /tmp/workdir
RUN yum install -y \
autoconf \
automake \
bzip2 \
bzip2-devel \
cmake \
freetype-devel \
gcc \
gcc-c++ \
git \
libtool \
make \
pkgconfig \
glibc-static \
zlib-devel
FROM base as build
ENV FFMPEG_VERSION=4.2.2
ARG PREFIX=/opt/ffmpeg
RUN \
DIR=/tmp/nasm && mkdir -p ${DIR} && cd ${DIR} && \
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.bz2 && \
tar xjvf nasm-2.15.05.tar.bz2 && \
cd nasm-2.15.05 && \
./autogen.sh && \
./configure --prefix="$PREFIX" --bindir="$PREFIX/bin" && \
make && \
make install
RUN \
DIR=/tmp/nasm && mkdir -p ${DIR} && cd ${DIR} && \
curl -O -L https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz && \
tar xzvf yasm-1.3.0.tar.gz && \
cd yasm-1.3.0 && \
./configure --prefix="$PREFIX" --bindir="$PREFIX/bin" && \
make && \
make install
## ffmpeg https://ffmpeg.org/
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
curl -sL https://github.com/giusedroid/ffmpeg-lgpl-amazonlinux2/blob/main/ffmpeg/ffmpeg-${FFMPEG_VERSION}.tar.bz2?raw=true > ffmpeg.tar.bz2 && \
tar -jx --strip-components=1 -f ffmpeg.tar.bz2
ENV PATH="$PREFIX/bin:$PATH"
RUN \
DIR=/tmp/ffmpeg && mkdir -p ${DIR} && cd ${DIR} && \
./configure \
--prefix="${PREFIX}" \
--pkg-config-flags="--static" \
--extra-cflags="-I${PREFIX}/include -static" \
--extra-ldflags="-L${PREFIX}/lib -static" \
--disable-debug \
--disable-doc \
--disable-ffplay \
--disable-network \
--bindir="${PREFIX}/bin" && \
make && \
make install
RUN amazon-linux-extras install python3
RUN pip3 install -U pip && python3 -m pip install awscli boto3
WORKDIR /tmp/workdir
ENTRYPOINT ["ffmpeg"]