Skip to content

Commit

Permalink
Multi-platform build
Browse files Browse the repository at this point in the history
  • Loading branch information
max-lt committed Sep 26, 2024
1 parent 2ab98ba commit c907ebd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c907ebd

Please sign in to comment.