1
1
FROM alpine:3.4
2
2
MAINTAINER Alfred Gutierrez <alf.g.jr@gmail.com>
3
3
4
- # ENV BENTO4_VERSION 1-5-0-615
5
4
ENV BENTO4_VERSION 1.5.0-615
5
+ ENV BENTO4_INSTALL_DIR=/opt/bento4
6
6
ENV PATH=/opt/bento4/bin:${PATH}
7
-
7
+
8
+ # Install dependencies.
8
9
RUN apk update \
9
- && apk add wget ca-certificates python make gcc g++ libgcc
10
-
11
- # Get Bento4 SDK binaries and install to /opt/bento4.
12
- # RUN cd /tmp/ && wget http://zebulon.bok.net/Bento4/binaries/Bento4-SDK-${BENTO4_VERSION}.x86_64-unknown-linux.zip \
13
- # && unzip Bento4-SDK-${BENTO4_VERSION}.x86_64-unknown-linux.zip && rm Bento4-SDK-${BENTO4_VERSION}.x86_64-unknown-linux.zip
10
+ && apk add --no-cache python bash \
11
+ && apk add --no-cache --virtual .build-deps \
12
+ wget ca-certificates make gcc g++ libgcc
14
13
14
+ # Fetch source.
15
15
RUN cd /tmp/ \
16
16
&& wget -O Bento4-${BENTO4_VERSION}.tar.gz https://github.com/axiomatic-systems/Bento4/archive/v${BENTO4_VERSION}.tar.gz \
17
17
&& tar -xzvf Bento4-${BENTO4_VERSION}.tar.gz && rm Bento4-${BENTO4_VERSION}.tar.gz
18
18
19
- # RUN cd /tmp/ && mkdir -p /opt/bento4 && cp -r Bento4-SDK-1-5-0-615.x86_64-unknown-linux/. /opt/bento4/
19
+ # Create installation directories.
20
+ RUN mkdir -p \
21
+ ${BENTO4_INSTALL_DIR}/bin \
22
+ ${BENTO4_INSTALL_DIR}/scripts \
23
+ ${BENTO4_INSTALL_DIR}/include
24
+
25
+ # Build.
26
+ RUN cd /tmp/Bento4-${BENTO4_VERSION}/Build/Targets/x86-unknown-linux \
27
+ && make AP4_BUILD_CONFIG=Release
20
28
21
- RUN cd /tmp/Bento4-${BENTO4_VERSION}/Build/Targets/x86-unknown-linux && make AP4_BUILD_CONFIG=Release
22
- RUN cd /tmp/ && mkdir -p /opt/bento4/bin && cp -r Bento4-${BENTO4_VERSION}/Build/Targets/x86-unknown-linux/Release/. /opt/bento4/bin
23
- RUN cd /tmp/ && mkdir -p /opt/bento4/scripts && cp -r Bento4-${BENTO4_VERSION}/Source/Python/utils/. /opt/bento4/utils
24
- RUN cd /tmp/ && cp -r Bento4-${BENTO4_VERSION}/Source/Python/wrappers/. /opt/bento4/bin
25
- RUN cd /tmp/ && mkdir -p /opt/bento4/include && cp -r Bento4-${BENTO4_VERSION}/Source/C++/**/*.h . /opt/bento4/include
29
+ # Install.
30
+ RUN cd /tmp \
31
+ && cp -r Bento4-${BENTO4_VERSION}/Build/Targets/x86-unknown-linux/Release/. ${BENTO4_INSTALL_DIR}/bin \
32
+ && cp -r Bento4-${BENTO4_VERSION}/Source/Python/utils/. ${BENTO4_INSTALL_DIR}/utils \
33
+ && cp -r Bento4-${BENTO4_VERSION}/Source/Python/wrappers/. ${BENTO4_INSTALL_DIR}/bin \
34
+ && cp -r Bento4-${BENTO4_VERSION}/Source/C++/**/*.h . ${BENTO4_INSTALL_DIR}/include
26
35
27
- RUN rm -rf /tmp/Bento4-${BENTO4_VERSION}
36
+ # Cleanup.
37
+ RUN rm -rf /var/cache/* /tmp/* \
38
+ && apk del .build-deps
28
39
29
- WORKDIR /opt/bento4/bin
40
+ WORKDIR /opt/bento4
30
41
31
- CMD ["sh " ]
42
+ CMD ["bash " ]
0 commit comments