nginx-micro - minimal, multi-architecture, static NGINX container

1 johnnyjoy 1 7/8/2025, 6:40:02 PM github.com ↗

Comments (1)

johnnyjoy · 9m ago

    I built nginx-micro – an ultra-minimal, statically linked nginx Docker image.

    It’s built FROM scratch (literally nothing but a single static binary and a config), no shell, no package manager, no writable filesystem. On amd64, the image is ~432KB—over 150x smaller than the official nginx image.

    Why?

        For cases where you want nginx as a tiny HTTP or FastCGI server behind a real SSL proxy (e.g., Caddy, Traefik, HAProxy, etc.)

        Designed for microservices, CI/CD, internal APIs, asset serving, and edge/cloud environments where security is handled upstream

        Runs multi-arch (amd64, arm64, arm/v7, 386, ppc64le, s390x, riscv64)

    What’s in?

        Only static serving and FastCGI (PHP-FPM)

        No SSL, no proxy, no bloat, no shell, no package manager, no surprises

        Logs to stdout/stderr (container-native)

    Use case: Serve static files, handle PHP via FastCGI, or do health checks in container-native environments, where the official image is overkill.

    Caveat: Don’t use for public-facing, SSL, or proxy scenarios directly; this is a minimal, internal-purpose build.

    GitHub: https://github.com/johnnyjoy/nginx-micro

    Would love feedback—on image design, niche use-cases, or anything you think is missing!

    Thanks.