From 7975615c6c44c09b187a16fa8dfb2ef5400133aa Mon Sep 17 00:00:00 2001 From: Tomasz Duda Date: Mon, 3 Oct 2022 02:03:13 +0200 Subject: [PATCH] check compilation --- .github/workflows/docker-alpine-image.yaml | 25 ++++++++++++++++++ pkg/docker/Dockerfile.alpine | 30 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/docker-alpine-image.yaml create mode 100644 pkg/docker/Dockerfile.alpine diff --git a/.github/workflows/docker-alpine-image.yaml b/.github/workflows/docker-alpine-image.yaml new file mode 100644 index 0000000..3a91e0c --- /dev/null +++ b/.github/workflows/docker-alpine-image.yaml @@ -0,0 +1,25 @@ +name: Build Alpine + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + buildx: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + driver-opts: image=moby/buildkit:master + - name: Build + run: docker buildx build --file pkg/docker/Dockerfile.alpine --platform linux/arm64,linux/amd64,linux/arm/v7 . diff --git a/pkg/docker/Dockerfile.alpine b/pkg/docker/Dockerfile.alpine new file mode 100644 index 0000000..ea31663 --- /dev/null +++ b/pkg/docker/Dockerfile.alpine @@ -0,0 +1,30 @@ +FROM alpine:3.16 as build +RUN apk add --no-cache \ + alpine-sdk \ + linux-headers \ + libjpeg-turbo-dev \ + libevent-dev \ + libbsd-dev \ + libgpiod-dev + +WORKDIR /build/ustreamer/ +COPY . . +RUN make -j5 WITH_GPIO=1 + +FROM alpine:3.16 as run + +RUN apk add --no-cache \ + libevent \ + libjpeg-turbo \ + libevent \ + libgpiod \ + libbsd + +WORKDIR /ustreamer +COPY --from=build /build/ustreamer/src/ustreamer.bin ustreamer + +EXPOSE 8080 +ENTRYPOINT ["./ustreamer", "--host=0.0.0.0"] +CMD ["--dv-timings", "--format", "UYVY"] + +# vim: syntax=dockerfile