-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathDockerfile.dev
76 lines (67 loc) · 2.33 KB
/
Dockerfile.dev
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
##############################
#
# m4b-tool build image
#
##############################
FROM alpine:3.9.2 as build
RUN echo "---- INSTALL BUILD DEPENDENCIES ----" \
&& echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories \
&& apk add --no-cache --update --upgrade --virtual=build-dependencies \
autoconf \
automake \
boost-dev \
build-base \
gcc \
git \
tar \
fdk-aac-dev \
wget && \
echo "---- COMPILE SANDREAS MP4V2 (for sort-title, sort-album and sort-author) ----" \
&& cd /tmp/ \
&& wget https://github.com/sandreas/mp4v2/archive/master.zip \
&& unzip master.zip \
&& cd mp4v2-master \
&& ./configure && \
make -j4 && \
make install && make distclean && \
echo "---- COMPILE FDKAAC ENCODER (executable binary for usage of --audio-profile) ----" \
&& cd /tmp/ \
&& wget https://github.com/nu774/fdkaac/archive/1.0.0.tar.gz \
&& tar xzf 1.0.0.tar.gz \
&& cd fdkaac-1.0.0 \
&& autoreconf -i && ./configure && make -j4 && make install && rm -rf /tmp/* && \
echo "---- REMOVE BUILD DEPENDENCIES (to keep image small) ----" \
&& apk del --purge build-dependencies && rm -rf /tmp/*
##############################
#
# m4b-tool development image
#
##############################
FROM alpine:3.9.2
ENV WORKDIR /m4b-tool
ARG M4B_TOOL_DOWNLOAD_LINK="https://github.com/sandreas/m4b-tool/releases/latest/download/m4b-tool.phar"
RUN echo "---- INSTALL RUNTIME PACKAGES ----" && \
apk add --no-cache --update --upgrade \
# mp4v2: required libraries
libstdc++ \
# m4b-tool: php cli, required extensions and php settings
php7-cli \
php7-dom \
php7-json \
php7-xml \
php7-mbstring \
php7-phar \
php7-tokenizer \
php7-xmlwriter \
&& echo "date.timezone = UTC" >> /etc/php7/php.ini \
# fdkaac: required libaries
&& echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories \
&& apk add --no-cache --update --upgrade fdk-aac-dev
# copy ffmpeg static with libfdk from mwader docker image
COPY --from=mwader/static-ffmpeg:4.1.3-1 /ffmpeg /usr/local/bin/
# copy compiled mp4v2 binaries, libs and fdkaac encoder to runtime image
COPY --from=build /usr/local/bin/mp4* /usr/local/bin/fdkaac /usr/local/bin/
COPY --from=build /usr/local/lib/libmp4v2* /usr/local/lib/
WORKDIR ${WORKDIR}
# CMD ["list"]
ENTRYPOINT ["/bin/ash"]