Add Docker image to build script. Commented out. Closes #35

This commit is contained in:
Gabe Kangas 2020-07-07 00:23:21 -07:00
parent 4344ab6b00
commit 8b80afad96
2 changed files with 22 additions and 0 deletions

10
scripts/Dockerfile-build Normal file
View file

@ -0,0 +1,10 @@
FROM golang:alpine
EXPOSE 8080 1935
RUN mkdir /app
ADD . /app
COPY ./config-example.yaml /app/config.yaml
WORKDIR /app
RUN apk add --no-cache ffmpeg ffmpeg-libs
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o owncast .
WORKDIR /app
CMD ["/app/owncast", "-enableVerboseLogging"]

View file

@ -70,3 +70,15 @@ done
# open "https://github.com/gabek/owncast/releases/new" # open "https://github.com/gabek/owncast/releases/new"
# open dist # open dist
# fi # fi
# Docker build
# Must authenticate first: https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages
# DOCKER_IMAGE="owncast-${VERSION}"
# echo "Building Docker image ${DOCKER_IMAGE}..."
# # Change to the root directory of the repository
# cd $(git rev-parse --show-toplevel)
# docker build -t owncast . -t="${DOCKER_IMAGE}" -f scripts/Dockerfile-build
# docker tag $DOCKER_IMAGE docker.pkg.github.com/gabek/owncast/$DOCKER_IMAGE:$VERSION
# docker push docker.pkg.github.com/gabek/owncast/$DOCKER_IMAGE:$VERSION