Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,29 @@ jobs:
matrix:
include:
- arch: amd64
platform: linux/amd64
runner: ubuntu-24.04
- arch: arm64
platform: linux/arm64
runner: ubuntu-24.04-arm
# No native 32-bit ARM runner exists, so this one is built and
# tested under QEMU emulation and takes noticeably longer.
- arch: arm-v7
platform: linux/arm/v7
runner: ubuntu-24.04
emulated: true
runs-on: ${{ matrix.runner }}
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
steps:
- uses: actions/checkout@v7

- name: Set up QEMU
if: matrix.emulated
uses: docker/setup-qemu-action@v4
with:
platforms: ${{ matrix.platform }}

- uses: docker/setup-buildx-action@v4

# Optional: lifts Docker Hub's anonymous pull limit for the Alpine base
Expand All @@ -71,6 +85,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
platforms: ${{ matrix.platform }}
load: true
pull: true
tags: nginx:ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ jobs:
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
![HTTP/3](https://img.shields.io/badge/HTTP%2F3-QUIC-success)
![HTTP/2](https://img.shields.io/badge/HTTP%2F2-enabled-success)
![Non-root](https://img.shields.io/badge/runs%20as-non--root-success)
![Platforms](https://img.shields.io/badge/platforms-amd64%20%7C%20arm64-informational)
![Platforms](https://img.shields.io/badge/platforms-amd64%20%7C%20arm64%20%7C%20arm%2Fv7-informational)
![Base](https://img.shields.io/badge/base-Alpine-0D597F?logo=alpinelinux&logoColor=white)
![Vulnerability scan](https://img.shields.io/badge/scanned%20by-Trivy-1904DA)
[![Dependabot](https://img.shields.io/badge/Dependabot-enabled-025E8C?logo=dependabot)](.github/dependabot.yml)
Expand Down Expand Up @@ -77,7 +77,7 @@ Ports: `80/tcp`, `443/tcp`, `443/udp`.
- **Start-up hooks.** Executable `*.sh` files in `/docker-entrypoint.d/` run before nginx.
- **Logs to stdout/stderr**, with an optional JSON access-log format.
- **Graceful shutdown** on `docker stop` (`SIGQUIT`).
- **Multi-arch.** `linux/amd64` and `linux/arm64`.
- **Multi-arch.** `linux/amd64`, `linux/arm64` and `linux/arm/v7` (32-bit ARM, such as a Raspberry Pi with a 32-bit OS).

### Compiled-in modules

Expand Down Expand Up @@ -206,7 +206,7 @@ git tag v1.31.10
git push origin v1.31.10
```

The [release workflow](.github/workflows/release.yml) builds the image, runs the smoke test and the vulnerability scan, then builds for `amd64` and `arm64` and pushes it to every configured registry with an SBOM and build provenance attached. Both registries always get the same image and the same tags.
The [release workflow](.github/workflows/release.yml) builds the image, runs the smoke test and the vulnerability scan, then builds for `amd64`, `arm64` and `arm/v7` and pushes it to every configured registry with an SBOM and build provenance attached. Both registries always get the same image and the same tags.

### Docker Hub

Expand Down Expand Up @@ -275,7 +275,7 @@ The smoke test starts the image read-only with all capabilities dropped and chec
[CI](.github/workflows/ci.yml) runs on every push and pull request:

- **Lint**: hadolint for the Dockerfile, ShellCheck for the scripts, actionlint for the workflows.
- **Build and smoke test** on `amd64` and `arm64`, both on native runners.
- **Build and smoke test** on `amd64` and `arm64` on native runners, and on `arm/v7` under QEMU emulation.
- **Vulnerability scan** with Trivy: fails on any finding in the image's Alpine packages that has a fix available, whatever its severity. The build runs `apk upgrade`, so every fixed package Alpine has published is in the image. nginx itself and the two modules are compiled from source, so they are not covered by the scan; keep them current through the pinned versions above.

[Dependabot](.github/dependabot.yml) opens weekly pull requests for new versions of the GitHub Actions, the Alpine base image and the test dependencies.
Expand Down
3 changes: 2 additions & 1 deletion tests/smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ docker run --detach --name "$name" \
--publish "127.0.0.1:${https_port}:443/udp" \
"$image" >/dev/null

for _ in $(seq 1 30); do
# Up to 30 seconds: start-up under QEMU emulation (arm/v7 in CI) is slow.
for _ in $(seq 1 60); do
fetch --output /dev/null "http://127.0.0.1:${http_port}/healthz" 2>/dev/null && break
sleep 0.5
done
Expand Down