From c907ebdd56a0e90836d1ffa93af1a1a4faa3fea8 Mon Sep 17 00:00:00 2001 From: max-lt Date: Thu, 26 Sep 2024 09:24:18 +0200 Subject: [PATCH] Multi-platform build --- .github/workflows/docker.yml | 3 +++ Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 65f4d1d..969ee13 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -48,6 +48,8 @@ jobs: tags: | type=semver,pattern={{raw}} type=raw,value=latest,enable={{is_default_branch}} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry @@ -62,6 +64,7 @@ jobs: uses: docker/build-push-action@v5 with: context: ./ + platforms: linux/amd64,linux/arm64 file: ./Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} diff --git a/Dockerfile b/Dockerfile index ae10e65..cd1e669 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ +# Base image FROM nginx:1.27.1-alpine3.20 as base +# Build image FROM base as builder ARG JWT_MODULE_PATH=/usr/local/lib/ngx-http-auth-jwt-module @@ -51,6 +53,7 @@ RUN cd /usr/src/nginx-${NGINX_VERSION} \ && ./configure --with-compat --add-dynamic-module=$JWT_MODULE_PATH \ && make modules +# Final image FROM base as jwt-nginx ARG LIBJWT=libjwt.so.2.10.1