diff --git a/.github/workflows/docker-nextcloud-push-server.yml b/.github/workflows/docker-nextcloud-push-server.yml index 3e39a00..c675084 100644 --- a/.github/workflows/docker-nextcloud-push-server.yml +++ b/.github/workflows/docker-nextcloud-push-server.yml @@ -14,13 +14,21 @@ permissions: jobs: push-server: + strategy: + matrix: + platform: + - docker: amd64 + push: x86_64 + - docker: arm64 + push: aarch64 uses: ./.github/workflows/docker.yml with: dockerfile: nextcloud/push-server/Dockerfile context: nextcloud/push-server tag: spreed:push-${{ vars.SPREED_PUSH_VERSION }} args: | - JANUS_VERSION=${{ vars.SPREED_PUSH_VERSION }} + PLATFORM=${{ matrix.platform.push }} + PUSH_VERSION=${{ vars.SPREED_PUSH_VERSION }} labels: | org.opencontainers.image.description=Update notifications for nextcloud clients - platforms: linux/amd64,linux/arm64 + platforms: linux/${{ matrix.platform.docker }} diff --git a/nextcloud/push-server/Dockerfile b/nextcloud/push-server/Dockerfile index d33db86..375d721 100644 --- a/nextcloud/push-server/Dockerfile +++ b/nextcloud/push-server/Dockerfile @@ -1,20 +1,10 @@ -FROM rust:1-alpine AS build +FROM alpine:3 +ARG PLATFORM ARG PUSH_VERSION=0.7.0 -RUN apk add --no-cache git && \ - git clone -b v${PUSH_VERSION} https://github.com/nextcloud/notify_push /usr/local/src - -WORKDIR /usr/local/src - -RUN apk add --no-cache \ - musl-dev \ - && \ - cargo build --release - - -FROM alpine:3 +ADD https://github.com/nextcloud/notify_push/releases/download/v${PUSH_VERSION}/notify_push-${PLATFORM}-unknown-linux-musl /usr/local/bin/notify_push -COPY --from=build /usr/local/src/target/release/notify_push /usr/local/bin/notify_push +USER 1000 CMD [ "/usr/local/bin/notify_push", "--no-ansi", "--port", "1337", "--bind", "0.0.0.0" ]