Skip to content

Commit 6f6670c

Browse files
committed
Update dockerfile and readme. Add travis config and license.
1 parent a6f5545 commit 6f6670c

File tree

4 files changed

+97
-17
lines changed

4 files changed

+97
-17
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
sudo: required
2+
3+
language: bash
4+
services: docker
5+
6+
env:
7+
- DOCKER_IMAGE=bento4
8+
9+
script:
10+
- docker build -t ${DOCKER_IMAGE} .
11+
12+
after_script:
13+
- docker images
14+
- docker run -it ${DOCKER_IMAGE} mp4info

Dockerfile

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
FROM alpine:3.4
22
MAINTAINER Alfred Gutierrez <alf.g.jr@gmail.com>
33

4-
# ENV BENTO4_VERSION 1-5-0-615
54
ENV BENTO4_VERSION 1.5.0-615
5+
ENV BENTO4_INSTALL_DIR=/opt/bento4
66
ENV PATH=/opt/bento4/bin:${PATH}
7-
7+
8+
# Install dependencies.
89
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
1413

14+
# Fetch source.
1515
RUN cd /tmp/ \
1616
&& wget -O Bento4-${BENTO4_VERSION}.tar.gz https://github.com/axiomatic-systems/Bento4/archive/v${BENTO4_VERSION}.tar.gz \
1717
&& tar -xzvf Bento4-${BENTO4_VERSION}.tar.gz && rm Bento4-${BENTO4_VERSION}.tar.gz
1818

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
2028

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
2635

27-
RUN rm -rf /tmp/Bento4-${BENTO4_VERSION}
36+
# Cleanup.
37+
RUN rm -rf /var/cache/* /tmp/* \
38+
&& apk del .build-deps
2839

29-
WORKDIR /opt/bento4/bin
40+
WORKDIR /opt/bento4
3041

31-
CMD ["sh"]
42+
CMD ["bash"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Alfred Gutierrez
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
11
# docker-bento4
2-
WIP
2+
A Bento4 Dockerfile built from source. Built on Alpine Linux.
3+
4+
* https://www.bento4.com/
5+
6+
[![Docker Stars](https://img.shields.io/docker/stars/alfg/bento4.svg)](https://hub.docker.com/r/alfg/bento4/)
7+
[![Docker Pulls](https://img.shields.io/docker/pulls/alfg/bento4.svg)](https://hub.docker.com/r/alfg/bento4/)
8+
[![Docker Automated build](https://img.shields.io/docker/automated/alfg/bento4.svg)](https://hub.docker.com/r/alfg/bento4/builds/)
9+
[![Build Status](https://travis-ci.org/alfg/docker-bento4.svg?branch=master)](https://travis-ci.org/alfg/docker-bento4)
10+
11+
## Usage
12+
13+
* Pull Docker image and run:
14+
```
15+
docker pull alfg/bento4
16+
docker run -it --rm alfg/bento4 mp4info
17+
```
18+
19+
* or build and run container from source:
20+
21+
```
22+
docker build -t bento4 .
23+
docker run -it bento4 mp4info
24+
```
25+
26+
* or use as a base image in your Dockerfile:
27+
```
28+
FROM alfg/bento4:latest
29+
```
30+
31+
## Resources
32+
* https://alpinelinux.org/
33+
* https://www.bento4.com/
34+
35+
## License
36+
MIT

0 commit comments

Comments
 (0)