diff --git a/.github/workflows/Docker.yml b/.github/workflows/Docker.yml index 098bd4e1f7..6a2a91b6a7 100644 --- a/.github/workflows/Docker.yml +++ b/.github/workflows/Docker.yml @@ -19,12 +19,31 @@ jobs: include: - image: opensign/opensign dockerfile: apps/OpenSign/Dockerhubfile + platform: linux/amd64 + targetarch: "" + - image: opensign/opensign + dockerfile: apps/OpenSign/Dockerhubfile + platform: linux/arm64 + targetarch: "arm64v8/" + - image: opensign/opensignserver + dockerfile: apps/OpenSignServer/Dockerhubfile + platform: linux/amd64 + targetarch: "" - image: opensign/opensignserver dockerfile: apps/OpenSignServer/Dockerhubfile + platform: linux/arm64 + targetarch: "arm64v8/" steps: - name: Checkout uses: actions/checkout@v3 + - + name: Set up QEMU + if: matrix.platform == 'linux/arm64' + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub uses: docker/login-action@v2 @@ -49,6 +68,9 @@ jobs: with: context: . file: ${{ matrix.dockerfile }} + platforms: ${{ matrix.platform }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: | + TARGETARCH=${{ matrix.targetarch }} diff --git a/apps/OpenSign/Dockerhubfile b/apps/OpenSign/Dockerhubfile index 6f2d22e295..66e4820d56 100644 --- a/apps/OpenSign/Dockerhubfile +++ b/apps/OpenSign/Dockerhubfile @@ -1,5 +1,7 @@ # Use an official Node runtime as the base image -FROM node:22.14.0 +# Use architecture-specific base image for arm64 +ARG TARGETARCH +FROM ${TARGETARCH}node:22.14.0 # Set the working directory inside the container WORKDIR /usr/src/app diff --git a/apps/OpenSignServer/Dockerhubfile b/apps/OpenSignServer/Dockerhubfile index 459562228e..30fc0ba4e6 100644 --- a/apps/OpenSignServer/Dockerhubfile +++ b/apps/OpenSignServer/Dockerhubfile @@ -1,6 +1,6 @@ # Use an official Node runtime as the base image -FROM node:22.14.0 - +ARG TARGETARCH +FROM ${TARGETARCH}node:22.14.0 # Install LibreOffice for DOCX to PDF conversions RUN apt-get update \