Source-built NGINX 1.30 + Brotli + PHP 8.4 FPM on Debian 13, /config parity, 0 fixable CVEs.
3.6K
A source-built NGINX (stable 1.30.x with HTTP/3, Brotli, and PHP 8.4 FPM) container image on Debian 13 (trixie-slim) with drop-in /config layout compatibility, maintained by Daniel G. Cosenza from FNX Labs.
dgcosenza/nginxghcr.io/dgcosenza/nginx (identical signed multi-arch digest)dgcosenza/nginx-dockergoogle/ngx_brotli (2-clause BSD), PHP 8.4LICENSE and THIRD-PARTY-NOTICES.md)dgcosenza/nginx builds the latest official stable NGINX release from nginx.org alongside dynamic ngx_brotli modules (linked dynamically to Debian 13's libbrotli1) and Debian 13's PHP 8.4 FPM stack on fully upgraded debian:trixie-slim:
/config compatibility: Preserves PUID/PGID (user abc), /config/nginx/nginx.conf (included from /etc/nginx/nginx.conf), /config/nginx/site-confs/*.conf, /config/nginx/ssl.conf, /config/keys/cert.{crt,key}, /config/php/php-local.ini, /config/php/www2.conf, /config/log/, and /config/www/./etc/nginx/modules/10_http_brotli.conf (ngx_http_brotli_filter_module.so + ngx_http_brotli_static_module.so) and php-fpm8.4 listening on 127.0.0.1:9000 with common extensions (apcu, bcmath, bz2, curl, gd, gmp, igbinary, intl, ldap, mbstring, memcached, msgpack, mysql, pgsql, redis, soap, sqlite3, xml, xsl, zip).AUTO_RELOAD=true (or keep DOCKER_MODS=linuxserver/mods:swag-auto-reload) to watch /config/nginx via inotifywait and reload NGINX automatically after nginx -t validation — no external runtime mod downloads needed.tini as PID 1, compatible with security_opt: no-new-privileges:true, workers run as non-root abc, and every daily build enforces 0 fixable findings of any severity in both Trivy and Grype.| Component | Resolved Version |
|---|---|
| NGINX | 1.30.8 |
| ngx_brotli | 53e0fb5 |
| PHP-FPM | 8.4.28 |
| Base OS | Debian 13.8 (trixie-slim) |
| Architectures | linux/amd64, linux/arm64 |
| Uncompressed size (per arch) | amd64: 90.8 MB, arm64: 264.8 MB |
| Last verified build (UTC) | 2026-11-28 |
| Published multi-arch digest | dgcosenza/nginx@sha256:9708eaec9e35827dabf07e591c0c6abf2221352952df3efdec3c2e772bc5778b |
| GHCR mirror | ghcr.io/dgcosenza/nginx@sha256:9708eaec9e35827dabf07e591c0c6abf2221352952df3efdec3c2e772bc5778b |
| Supply chain | Cosign OIDC signed + SPDX & CycloneDX SBOM attestations + SLSA Build L3 provenance |
| Security gate (Trivy + Grype on SBOM) | 0 fixable findings of any severity (30 upstream-unfixed) |
| Tag | Policy | Description |
|---|---|---|
<version>-<YYYYMMDD> (e.g. 1.30.8-20261124) | Immutable | Date-stamped daily rebuild pinning the NGINX stable release and UTC build date. |
sha-<short> | Immutable | Packaging repository Git commit tag. |
<version> (e.g. 1.30.8) | Moving | Latest verified Debian 13 rebuild of that NGINX release. |
latest | Moving | Latest verified build tracking the newest official stable NGINX release. |
Production pinning: Pin by registry digest rather than pulling unpinned :latest:
image: dgcosenza/nginx:latest@sha256:<digest>
| Architecture | Status | Verification |
|---|---|---|
linux/amd64 | Published & natively tested | Built, smoke-tested, Dive-gated, Syft/Trivy/Grype-scanned, and Cosign-signed on native x86_64 CI runners. |
linux/arm64 | Published & natively tested | Built, smoke-tested, Dive-gated, Syft/Trivy/Grype-scanned, and Cosign-signed on native ARM64 CI runners. |
ghcr.io/dgcosenza/*), accompanied by automated signed GitHub Releases.docker rundocker run -d \
--name nginx \
--restart unless-stopped \
--security-opt no-new-privileges:true \
-p 192.0.2.10:443:443 \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e AUTO_RELOAD=true \
-v "$(pwd)/config:/config" \
dgcosenza/nginx:latest
See docker-compose.example.yml:
services:
nginx:
image: dgcosenza/nginx:latest
container_name: nginx
restart: unless-stopped
security_opt:
- no-new-privileges:true
ports:
- "192.0.2.10:443:443"
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- AUTO_RELOAD=true
volumes:
- ./config:/config
healthcheck:
test: ["CMD-SHELL", "curl -sk -o /dev/null -w '%{http_code}' --max-time 5 https://127.0.0.1/ | grep -qE '^(200|301|302|401)$$'"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
| Variable | Required | Default | Description |
|---|---|---|---|
PUID | No | 1000 | UID assigned to the abc NGINX/PHP-FPM worker user. |
PGID | No | 1000 | GID assigned to the abc NGINX/PHP-FPM worker group. |
TZ | No | Etc/UTC | Container timezone (IANA timezone name). |
AUTO_RELOAD | No | false | Set true to watch /config/nginx with inotifywait and reload NGINX after nginx -t succeeds. Also activates automatically if DOCKER_MODS contains auto-reload. |
| Path / Port | Mode / Owner | Purpose |
|---|---|---|
/config/nginx/ | PUID:PGID | nginx.conf, ssl.conf, worker_processes.conf, resolver.conf, real-ip.conf, dhparams.pem, site-confs/*.conf. Existing files are never overwritten. |
/config/keys/ | PUID:PGID | TLS certificate (cert.crt) and private key (cert.key, auto-generated self-signed on fresh boot if absent). |
/config/php/ | PUID:PGID | php-local.ini (loaded into FPM & CLI) and www2.conf (appended to [www] pool overrides). |
/config/www/ | PUID:PGID | Default web root for static and PHP content. |
/config/log/ | PUID:PGID | nginx/access.log, nginx/error.log, php/error.log. |
80/tcp, 443/tcp | Container ports | HTTP and HTTPS listeners (bind explicitly to your LAN/proxy interface). |
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD ["sh", "-c", "curl -sk -o /dev/null -w '%{http_code}' --max-time 5 https://127.0.0.1/ | grep -qE '^(200|301|302|401)$'"]
Probes the local HTTPS endpoint and succeeds on HTTP 200, 301, 302, or 401 (supporting HTTP Basic Auth default vhosts).
lscr.io/linuxserver/nginxThis image is designed as a drop-in replacement for existing /config volumes:
./config and tag your outgoing image for rollback../config on non-conflicting loopback ports and run docker exec <trial> nginx -t.ngx_brotli (such as Lua or RTMP), remove those directives or build with the extra module before cutover. Standard reverse-proxy, TLS, Brotli, HTTP Basic Auth, and PHP-FPM (127.0.0.1:9000) configurations work without changes.image: dgcosenza/nginx:latest@sha256:<digest> in Compose and recreate the service (docker compose up -d nginx).Every published digest (multi-arch index and per-architecture manifests) on both Docker Hub and GHCR is keyless-signed with Sigstore Cosign (GitHub OIDC), attested with SPDX and CycloneDX SBOMs, and backed by SLSA Build L3 provenance (actions/attest-build-provenance).
cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/nginx-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/nginx:latest
# Or against Docker Hub (identical digest):
cosign verify \
--certificate-identity-regexp="^https://github\.com/dgcosenza/nginx-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
dgcosenza/nginx:latest
cosign verify-attestation \
--type spdxjson \
--certificate-identity-regexp="^https://github\.com/dgcosenza/nginx-docker/\.github/workflows/daily\.yml@refs/heads/main$" \
--certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
ghcr.io/dgcosenza/nginx@sha256:<arch-digest>
gh attestation verify oci://ghcr.io/dgcosenza/nginx:latest --owner dgcosenza
--ignore-unfixed gate) and Grype (--only-fixed, severity cutoff negligible, blocking gate), plus generates an SPDX SBOM (sbom.spdx.json) and provenance artifact. Publication is blocked on any fixable finding of any severity.tini PID 1, no-new-privileges:true compatible, worker processes drop to non-root abc (PUID:PGID), compilers excluded from runtime layer, server_tokens off and expose_php = Off in defaults.SECURITY.md.git clone https://github.com/dgcosenza/nginx-docker.git
cd nginx-docker
docker buildx build \
--platform linux/amd64 \
--load \
--build-arg BUILD_DATE="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--build-arg IMAGE_REVISION="$(git rev-parse HEAD)" \
-t dgcosenza/nginx:local \
.
| Build Arg | Default | Purpose |
|---|---|---|
NGINX_VERSION | 1.30.8 | Official stable NGINX release from nginx.org (overridden daily by CI). |
NGX_BROTLI_COMMIT | 53e0fb55f250f48fe80c0ddbf6c0f7103cdbaae1 | Pinned google/ngx_brotli commit SHA. |
DEBIAN_BASE | debian:trixie-slim | Base OS image. |
BUILD_DATE | unknown | RFC 3339 UTC build timestamp. |
IMAGE_REVISION | "" | Packaging repository Git SHA. |
IMAGE_SOURCE | https://github.com/dgcosenza/nginx-docker | Source URL for OCI labels. |
.github/workflows/daily.yml runs automatically every day at 04:31 UTC, on pushes to main, on pull requests (verification only, without pushing), and via workflow_dispatch. Every scheduled run executes a seven-step automated pipeline (gated by .github/workflows/public-check.yml):
nginx.org and the debian:trixie-slim base digest, diffs against versions.json, and emits upstream-changes.md.linux/amd64 with --no-cache on schedule, compiles NGINX + ngx_brotli, upgrades Debian 13 packages and PHP 8.4 security updates (apt-get update && apt-get -y upgrade), and generates an SPDX SBOM (sbom.spdx.json) and provenance artifact.--ignore-unfixed gate) and Grype (blocking --only-fixed gate, severity cutoff negligible), diffs findings against the previous scan to record resolved CVEs, and retains reports for 90 days.tests/smoke.sh to verify fresh /config initialization, tini PID 1, non-root abc NGINX and PHP-FPM workers, HTTPS 200, Brotli (Content-Encoding: br), PHP 8.4 execution, and a negative closed-port healthcheck test.latest, <version>, <version>-<YYYYMMDD>, and sha-<short> tags to Docker Hub and records the immutable digest.versions.json, the README Current Versions block, and a dated CHANGELOG.md entry via github-actions[bot] with [skip ci] when content changes, then syncs Docker Hub overview and short description via peter-evans/dockerhub-description.main or a scheduled run, CI opens or updates a single GitHub issue labeled ci-failure with the failing job and run link, and automatically closes it on the next green run.1.30.x) on Debian 13 (trixie-slim): Avoids downgrading to Debian 13's distro-frozen nginx 1.26.x while retaining Debian 13 glibc, OpenSSL 3, PHP 8.4, and daily Debian Security updates.ngx_brotli: Links ngx_brotli against Debian 13's libbrotli1 rather than bundling static C sources so Debian Security patches apply automatically.inotifywait auto-reload: Eliminates third-party runtime container mod downloads while maintaining drop-in compatibility with existing DOCKER_MODS / AUTO_RELOAD Compose configurations.This repository follows a clear packaging-vs-upstream license split:
packaging: MIT): Licensed under the MIT License — copyright Daniel G. Cosenza from FNX Labs.nginx/nginx, plus google/ngx_brotli and Debian 13 PHP 8.4) (upstream: BSD-2-Clause): NGINX and google/ngx_brotli are licensed under the 2-Clause BSD License (BSD-2-Clause); PHP 8.4 is licensed under the PHP License v3.01.Full third-party notices are maintained in THIRD-PARTY-NOTICES.md. Release history is maintained in CHANGELOG.md.
Content type
Image
Digest
sha256:9708eaec9…
Size
86.6 MB
Last updated
about 13 hours ago
docker pull dgcosenza/nginx