Skip to content

Instantly share code, notes, and snippets.

@wesleywillians
Created January 29, 2020 19:36
Show Gist options
  • Save wesleywillians/f04eb0a262082fbed30448eb4a11a68d to your computer and use it in GitHub Desktop.
Save wesleywillians/f04eb0a262082fbed30448eb4a11a68d to your computer and use it in GitHub Desktop.
FROM golang:1.13-alpine
ENV PATH="$PATH:/bin/bash" \
BENTO4_BIN="/opt/bento4/bin" \
PATH="$PATH:/opt/bento4/bin"
# FFMPEG
RUN apk add --update ffmpeg bash curl
# Install Bento
WORKDIR /tmp/bento4
ENV BENTO4_BASE_URL="http://zebulon.bok.net/Bento4/source/" \
BENTO4_VERSION="1-5-0-615" \
BENTO4_CHECKSUM="5378dbb374343bc274981d6e2ef93bce0851bda1" \
BENTO4_TARGET="" \
BENTO4_PATH="/opt/bento4" \
BENTO4_TYPE="SRC"
# download and unzip bento4
RUN apk add --update --upgrade curl python unzip bash gcc g++ scons && \
curl -O -s ${BENTO4_BASE_URL}/Bento4-${BENTO4_TYPE}-${BENTO4_VERSION}${BENTO4_TARGET}.zip && \
sha1sum -b Bento4-${BENTO4_TYPE}-${BENTO4_VERSION}${BENTO4_TARGET}.zip | grep -o "^$BENTO4_CHECKSUM " && \
mkdir -p ${BENTO4_PATH} && \
unzip Bento4-${BENTO4_TYPE}-${BENTO4_VERSION}${BENTO4_TARGET}.zip -d ${BENTO4_PATH} && \
rm -rf Bento4-${BENTO4_TYPE}-${BENTO4_VERSION}${BENTO4_TARGET}.zip && \
apk del unzip && \
# don't do these steps if using binary install
cd ${BENTO4_PATH} && scons -u build_config=Release target=x86_64-unknown-linux && \
cp -R ${BENTO4_PATH}/Build/Targets/x86_64-unknown-linux/Release ${BENTO4_PATH}/bin && \
cp -R ${BENTO4_PATH}/Source/Python/utils ${BENTO4_PATH}/utils && \
cp -a ${BENTO4_PATH}/Source/Python/wrappers/. ${BENTO4_PATH}/bin
WORKDIR /go/src
CMD tail -f /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment