Skip to content

Commit

Permalink
refactor: download pre-compiled binary
Browse files Browse the repository at this point in the history
  • Loading branch information
axelrindle committed Jan 10, 2025
1 parent 4d8ecd4 commit fbe8c6c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/docker-nextcloud-push-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
18 changes: 4 additions & 14 deletions nextcloud/push-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]

0 comments on commit fbe8c6c

Please sign in to comment.