Production-ready, security-focused FreeNGINX image with HTTP/3, QUIC, ECH and PQC support.
Warning
This project has reached end-of-life and is no longer actively maintained. No further updates, bug fixes, security patches, or feature additions will be provided.
๐ Please migrate to: github.com/ammnt/nginx
The successor project provides the same hardened, distroless, security-focused approach with ongoing maintenance, up-to-date dependencies, and continued security patching. We strongly recommend all users migrate to ensure they receive critical updates.
Thank you to everyone who used this imageโค๏ธ
Important
The QuicTLS is now deprecated. I use OpenSSL, since this library natively supports OCSP, PQC, ECH and QUIC
Tip
You can find an example configuration file in the repository for successfully configuring HTTP/3, ECH and PQC๐ก
Important
UID/GID changed to 10001 - it's recommended for Kubernetes and prevents conflicts with system users
Docker Hub:
ammnt/freenginx
GitHub Container Registry:
ghcr.io/ammnt/freenginx
docker run -d \
--name freenginx \
-p 80:8080 \
-p 443:8443 \
ammnt/freenginxhttps://docs.docker.com/engine/security/rootless/
services:
freenginx:
image: ammnt/freenginx:latest
user: "10001:10001"
read_only: true
privileged: false
tmpfs:
- /tmp:mode=1700,size=1G,noexec,nosuid,nodev,uid=10001,gid=10001
cap_drop:
- all
container_name: freenginx
security_opt:
- no-new-privileges=true
- apparmor=docker-freenginx
- seccomp=./freenginx-seccomp.json
volumes:
- "./conf:/etc/freenginx:ro"
...apiVersion: v1
kind: Deployment
metadata:
name: freenginx-pss-restricted
spec:
containers:
- name: freenginx
image: ammnt/freenginx:latest
securityContext:
capabilities:
drop:
- ALL
privileged: false
runAsUser: 10001
runAsGroup: 10001
seccompProfile:
type: RuntimeDefault
runAsNonRoot: true
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
...freenginx/
โโโ ๐ง AGENTS.md # Dedicated file that guides AI coding agents
โโโ ๐ CODE_OF_CONDUCT.md # Code of Conduct for contributors
โโโ ๐ค CONTRIBUTING.md # Contributing guidelines
โโโ ๐ cosign.pub # Public key for image signing (Sigstore/cosign)
โโโ โ๏ธ default.conf # Default FreeNGINX configuration
โโโ ๐ณ dive-ci.yml # Dive configuration for Docker image analysis
โโโ ๐ณ Dockerfile.template # Dockerfile template (dynamic generation)
โโโ ๐ .dockerignore # Files to exclude from Docker build context
โโโ โ๏ธ .editorconfig # EditorConfig for consistent coding styles
โโโ ๐ง .env # Environment variables configuration
โโโ ๐ example.conf # Example FreeNGINX configuration for HTTP/3
โโโ ๐ freenginx.conf # Main FreeNGINX configuration file
โโโ ๐ก๏ธ freenginx-seccomp.json # Seccomp profile for FreeNGINX security
โโโ ๐ฆ freenginx.toml # Additional FreeNGINX configuration (TOML format)
โโโ โ๏ธ .gitattributes # Git attributes configuration
โโโ ๐ .github/ # GitHub-specific configuration
โ โโโ ๐ dependabot.yml # Automated dependency updates
โ โโโ ๐ ISSUE_TEMPLATE/ # Issue creation templates
โ โ โโโ ๐ bug_report.md # Bug report template
โ โ โโโ โ๏ธ config.yml # Issue templates configuration
โ โ โโโ ๐ก feature_request.md # Feature request template
โ โโโ ๐ท๏ธ labeler.yml # PR labeler configuration
โ โโโ ๐ PULL_REQUEST_TEMPLATE.md # Pull Request template
โ โโโ ๐ workflows/ # GitHub Actions CI/CD pipelines
โ โโโ ๐จ build.yml # Build and testing workflow
โ โโโ ๐ codeql.yml # Static security analysis (CodeQL)
โ โโโ ๐ท๏ธ label.yml # Workflow for triage PR and apply labels
โโโ ๐ .gitignore # Git ignore rules
โโโ โ
hadolint.yaml # Hadolint configuration (Dockerfile linter)
โโโ โ๏ธ LICENSE # License agreement
โโโ ๐ README.md # Main project documentation
โโโ ๐ SECURITY.md # Security policy and vulnerability reporting
โโโ ๐ trivy.yaml # Trivy configuration (vulnerability scanning)- Memory protection - stack smashing protection and stack clash protection
- Control Flow Integrity - full CFI protection against ROP/JOP attacks via Intel CET
- Initialization hardening - automatic variable initialization to prevent data leaks
- Binary hardening - position independent executable for full ASLR (PaX, Linux kernel)
- Runtime protections - FORTIFY_SOURCE level 3 for buffer overflow detection
- C++ assertions - enhanced standard library security checks
- Linker hardening - read-only relocations and immediate binding, no-exec stack, separate code/data segments and CET enforcement
- Compiler warnings - comprehensive warning set with errors for critical issues
- Compiler - Clang/LLVM 22 toolchain with LLD linker
- Rootless by design - unprivileged runtime user (Docker Bench Security, OCI Runtime Specification)
- Distroless base - built from
scratchwith zero bloat (SLSA Level 3 requirements) - Minimal attack surface - no shell, no package manager, and no unnecessary modules (CIS Docker Benchmark, Principle of Least Privilege)
- Server header removal - anonymous signature ("security through obscurity")
- Kubernetes PSS compliant - fully conforms to Pod Security Standards (baseline & restricted)
- Docker security standards - follows CIS Docker Benchmarks and best practices
- Native QUIC and HTTP/3 support - OpenSSL and QUIC without patches or experimental implementations (RFC 9114, RFC 9000)
- Native PQC support - hybrid post-quantum key exchange algorithms in elliptic curves (NIST PQC Standardization, FIPS 203/204/205)
- Native TLS 1.3 with 0-RTT (RFC 8446, RFC 9001)
- Native support for the Encrypted Client Hello (ECH) - extension of the TLS 1.3 protocol (RFC 9849)
- Signed images - signatures and provenance attestation (SLSA Level 3 requirements, in-toto attestations)
- Comprehensive scanning by security tools (Scout, Trivy, Snyk, Grype, Dockle, Hadolint, Checkov)
- SBOM generation with Syft (NTIA Software Component Transparency)
- Multi-stage build with Alpine builder + scratch final image (Dockerfile best practices, BuildKit optimizations)
- Static compilation - static binary with minimal dependencies
- Mint tool integration - slimmed version of the image
- UPX runtime efficiency - minimal memory overhead with fast decompression (Executable compression)
- Binary stripping and size optimization and LTO optimization - debug symbols removed, dead code eliminated (DWARF debugging standard, ELF size reduction)
- zlib-ng with modern compression algorithms (RFC 1950, RFC 1951, RFC 1952)
- PCRE2 with JIT compilation for regex performance
- NJS with QuickJS-NG - JavaScript scripting support with modern engine
- Thread pool support for async I/O operations
- TCP Fast Open and SSL session resumption (RFC 7413, RFC 8446)
- Graceful shutdown - SIGQUIT handling for proper connection draining (RFC 7230)
- Brotli and ZSTD compression mechanisms support (RFC 7932, RFC 8878)
- Native TLS compression - support for certificate compression (RFC 8879)
- Image efficiency - perfect score in Dive analysis (100%)
- Comprehensive OCI labels - standardized metadata and annotations
- No excess ENTRYPOINT - no unnecessary wrapper scripts or bloat (12-factor app methodology, Cloud Native patterns)
- Built-in HEALTHCHECK - Configuration validation every 30s with 10s timeout (Docker HEALTHCHECK specification)
Found an issue or have an improvement?
Note: This image is designed for security-conscious production environments. For development purposes, consider using the official FreeNGINX image with full debugging capabilities.
This project is open source and maintained with โค๏ธ by ammnt.