Repository navigation
Expand file tree
/
Copy pathDockerfile-template.scratch
More file actions
62 lines (50 loc) · 1.73 KB
/
Copy pathDockerfile-template.scratch
File metadata and controls
62 lines (50 loc) · 1.73 KB
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
# ffmpeg - http://ffmpeg.org/download.html
#
# https://hub.docker.com/r/jrottenberg/ffmpeg/
#
#
FROM alpine:3.5 AS build
WORKDIR /tmp/workdir
ARG PKG_CONFIG_PATH=/opt/ffmpeg/lib/pkgconfig
ARG LD_LIBRARY_PATH=/opt/ffmpeg/lib
ARG PREFIX=/opt/ffmpeg
ARG MAKEFLAGS="-j2"
ENV %%ENV%%
RUN buildDeps="autoconf \
automake \
bash \
binutils \
bzip2 \
cmake \
curl \
coreutils \
expat-dev \
file \
g++ \
gcc \
gperf \
libtool \
make \
python \
openssl-dev \
tar \
yasm \
zlib-dev" && \
apk add --update ${buildDeps} libgcc libstdc++ ca-certificates libcrypto1.0 libssl1.0
%%RUN%%
RUN \
mkdir -p /tmp/fakeroot/lib && \
cp $(ldd ${PREFIX}/bin/ffmpeg | grep -o '/.\+\.so[^ ]*' | sort | uniq) /tmp/fakeroot/lib && \
for lib in /tmp/fakeroot/lib/*; do strip --strip-all $lib; done && \
cp -r ${PREFIX}/bin /tmp/fakeroot/bin/ && \
cp -r ${PREFIX}/share/ffmpeg /tmp/fakeroot/share/ && \
LD_LIBRARY_PATH=/tmp/fakeroot/lib /tmp/fakeroot/bin/ffmpeg -buildconf
### Release Stage
FROM scratch AS release
MAINTAINER Julien Rottenberg <julien@rottenberg.info>
CMD ["--help"]
ENTRYPOINT ["/bin/ffmpeg"]
WORKDIR /
COPY --from=build /tmp/fakeroot/ /
# Let's make sure the app built correctly
# Convenient to verify on https://hub.docker.com/r/jrottenberg/ffmpeg/builds/ console output