forked from pikvm/ustreamer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Roberto Anic Banic
committed
Jul 10, 2022
1 parent
db5b9d3
commit 2e1d4af
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Docker | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
docker: | ||
name: Publish to Docker Hub | ||
runs-on: self-hosted | ||
steps: | ||
- id: lowercase | ||
name: Generate lowercase | ||
uses: ASzc/change-string-case-action@v2 | ||
with: | ||
string: ${{ github.repository }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
tags: ${{ steps.lowercase.outputs.lowercase }}:latest | ||
target: release | ||
push: true | ||
platforms: | | ||
linux/386 | ||
linux/amd64 | ||
linux/arm/v6 | ||
linux/arm/v7 | ||
linux/arm64/v8 | ||
linux/ppc64le | ||
linux/s390x |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM alpine:latest as builder | ||
|
||
RUN apk add --update --no-cache make gcc musl-dev libevent-dev libbsd-dev libjpeg-turbo-dev libgpiod-dev | ||
|
||
WORKDIR /usr/src/ustreamer | ||
COPY . . | ||
|
||
RUN make WITH_GPIO=1 WITH_PTHREAD_NP=0 | ||
|
||
FROM alpine:latest as release | ||
|
||
RUN apk add --update --no-cache libevent libbsd libjpeg-turbo libgpiod | ||
|
||
ARG user=ustreamer | ||
ARG group=ustreamer | ||
ARG uid=2000 | ||
|
||
RUN adduser --uid=${uid} --disabled-password --gecos="" ${user} | ||
|
||
USER ${uid}:${uid} | ||
WORKDIR $HOME | ||
|
||
COPY --from=builder /usr/src/ustreamer/ustreamer /usr/local/bin/ustreamer | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT ["ustreamer"] | ||
CMD ["--host=0.0.0.0", "--port=8080"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: "3" | ||
|
||
services: | ||
ustreamer: | ||
image: nicba1010/ustreamer:latest | ||
ports: | ||
- "8080:8080" | ||
devices: | ||
- /dev/video0:/dev/video0 |