Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

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

Gabe Kangase4a992401581
diff --git a/scripts/Dockerfile-build b/scripts/Dockerfile-build
new file mode 100644
index 0000000000..46ca760477
--- /dev/null
+++ b/scripts/Dockerfile-build
@@ -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"]
\ No newline at end of file
diff --git a/scripts/build.sh b/scripts/build.sh
index f97972b026..3145bb8912 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -70,3 +70,15 @@ done
# open "https://github.com/gabek/owncast/releases/new"
# open dist
# 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