Last active
October 14, 2023 21:48
-
-
Save wesleywillians/9dcee3aa242ffb6bc92e7f0fdbc7aadd to your computer and use it in GitHub Desktop.
Dockerfile - Curso Code.education / Golang / Microsserviço de videos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.14-alpine3.11 | |
ENV PATH="$PATH:/bin/bash" \ | |
BENTO4_BIN="/opt/bento4/bin" \ | |
PATH="$PATH:/opt/bento4/bin" | |
# FFMPEG | |
RUN apk add --update ffmpeg bash curl make | |
# 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 | |
#vamos mudar para o endpoint correto. Usando top apenas para segurar o processo rodando | |
ENTRYPOINT [ "top" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It wasn't matching the checksum, so I submitted a review, downloading the file from another source.