ANGIE/NGINX Dockerized

This docker can be found on Github and Dockerhub

PHP packages are from Ondrejs excellent PPA
All Angie/NGINX related packages are from https://deb.myguard.nl

All php containers include nullmailer and composer.

Tags: (instead of “nginx” you can just use “angie”)

Debian:

  • eilandert/nginx:deb-latest (without php, nullmailer or composer)
  • eilandert/nginx:deb-multi (with all versions of php)
  • eilandert/nginx:deb-php5.6
  • eilandert/nginx:deb-php7.4
  • eilandert/nginx:deb-php8.0
  • eilandert/nginx:deb-php8.1
  • eilandert/nginx:deb-php8.2
  • eilandert/nginx:deb-php8.3

Bind /etc/nginx and /etc/modsecurity (for php, /etc/nullmailer and /etc/php) to an empty local directory and it will be populated on first run with default configs.

A valid docker-compose.yml would be:


services:
  nginx:
    container_name: nginx
    image: index.docker.io/eilandert/nginx:deb-php8.3
    stop_grace_period: 3s
    ports:
    - 80:80
    - 443:443/udp
    - 443:443
    restart: always
    volumes:
    - /etc/letsencrypt:/etc/letsencrypt:rw
    - ./nginx/php:/etc/php:rw
    - ./nginx/config:/etc/nginx: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

NGX_MODULES can contain all modules listed on https://deb.myguard.nl/nginx-modules/

For the multi-php-docker you can enable the following:
(Sockets will be made in /run/php/php7.4-fpm.sock or whatever version you enabled.)

– PHP56=YES
– PHP74=YES
– PHP80=YES
– PHP81=YES
– PHP82=YES
– PHP83=YES

I am open to suggestions!