The myguard Docker images bring the same performance-optimized, module-rich NGINX and Angie builds from the APT repository into containers. Images are rebuilt daily so you always get the latest upstream release with up-to-date packages.

All images are on Docker Hub (eilandert) and on GitHub. Swap nginx for angie in any tag.

Available image tags

eilandert/nginx:deb-latest       # NGINX without PHP
eilandert/nginx:deb-php8.3       # NGINX + PHP-FPM 8.3
eilandert/nginx:deb-php8.2
eilandert/nginx:deb-php8.1
eilandert/nginx:deb-php7.4
eilandert/nginx:deb-multi        # all PHP versions in one image
eilandert/angie:deb-latest
eilandert/angie:deb-php8.3
eilandert/angie:deb-multi

PHP packages come from Ondrej’s PPA. All PHP containers include nullmailer and Composer.

docker-compose example

Mount config directories to an empty local path — they are populated with working defaults on first start:

services:
  nginx:
    container_name: nginx
    image: eilandert/nginx:deb-php8.3
    stop_grace_period: 3s
    ports:
    - 80:80
    - 443:443
    - 443:443/udp       # UDP for HTTP/3 QUIC
    restart: always
    volumes:
    - /etc/letsencrypt:/etc/letsencrypt:rw
    - ./nginx/config:/etc/nginx:rw
    - ./nginx/php:/etc/php:rw
    - ./nginx/log:/var/log/nginx:rw
    - ./nginx/modsecurity:/etc/modsecurity:rw
    - ./nginx/nullmailer:/etc/nullmailer:rw
    - ./cache/nginx:/var/cache/nginx:rw
    - ./sites/wordpress:/home/wordpress:rw
    environment:
    - MALLOC=jemalloc
    - TZ=Europe/Amsterdam
    - NGX_MODULES=mod-http-security-headers,mod-http-brotli,mod-http-headers-more-filter,mod-http-dynamic-etag

Selecting modules at runtime

Set the NGX_MODULES environment variable to a comma-separated list of module names. No custom Dockerfile needed. All 50+ modules from the NGINX modules page are available, for example:

NGX_MODULES=mod-http-modsecurity,mod-http-geoip2,mod-http-brotli,mod-http-lua,mod-http-headers-more-filter

Memory allocator

Set MALLOC=jemalloc to use the jemalloc allocator (recommended for production — reduces memory fragmentation under high concurrency).

Multi-PHP container

The deb-multi image includes PHP 5.6 through 8.3. Enable versions with environment variables:

- PHP74=YES
- PHP81=YES
- PHP82=YES
- PHP83=YES

PHP-FPM sockets are created at /run/php/php8.3-fpm.sock (or whichever version is enabled).

HTTP/3 and QUIC

Expose UDP port 443 to enable HTTP/3. All myguard images are compiled with OpenSSL+quic and HTTP/3 support. Add to your nginx.conf:

server {
    listen 443 ssl;
    listen 443 quic reuseport;
    http3 on;
    add_header Alt-Svc 'h3=":443"; ma=86400';
}

Kubernetes

The same images work on Kubernetes. See the Kubernetes and Helm guide for Deployments, Ingress resources, and production Helm values.

Further reading