diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21bb145..2783b2e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,10 +34,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Build and push uses: docker/build-push-action@v5 with: context: . + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 0f19319..ca1b155 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,16 @@ +# Add build-base package for compiling source code +RUN apk add --no-cache --upgrade build-base + +# Clone the brudi source code from GitHub +RUN git clone https://github.com/mittwald/brudi.git /tmp/brudi + +# Build brudi from source for arm architecture +WORKDIR /tmp/brudi +RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o /usr/local/bin/brudi + +# Clean up the temporary directory +RUN rm -rf /tmp/brudi + FROM postgres:16.2-alpine3.19 LABEL maintainer="s83 " @@ -31,3 +44,4 @@ USER ${BRUDI_USER} WORKDIR /home/${BRUDI_USER} ENTRYPOINT ["brudi"] +