From 135667dc6b766f99094354b902c2f9270a50bdc9 Mon Sep 17 00:00:00 2001 From: fabiocicerchia Date: Fri, 11 Mar 2022 07:58:20 +0000 Subject: [PATCH] Automated updates --- README.md | 6 - docs/TAGS.md | 239 ---------- .../10-listen-on-ipv6-by-default.sh | 61 +++ .../8.5-20220306/20-envsubst-on-templates.sh | 32 ++ .../1.21.6/almalinux/8.5-20220306/Dockerfile | 407 +++++++++++++++++ .../almalinux/8.5-20220306/Dockerfile-compat | 409 ++++++++++++++++++ nginx/1.21.6/almalinux/8.5-20220306/Makefile | 233 ++++++++++ .../almalinux/8.5-20220306/default.conf | 44 ++ .../8.5-20220306/docker-entrypoint.sh | 40 ++ .../1.21.6/almalinux/8.5-20220306/nginx.conf | 31 ++ .../1.21.6/almalinux/8.5-20220306/support.sh | 17 + .../3.15.0/10-listen-on-ipv6-by-default.sh | 61 +++ .../alpine/3.15.0/20-envsubst-on-templates.sh | 32 ++ nginx/1.21.6/alpine/3.15.0/Makefile | 233 ++++++++++ nginx/1.21.6/alpine/3.15.0/default.conf | 44 ++ .../1.21.6/alpine/3.15.0/docker-entrypoint.sh | 40 ++ nginx/1.21.6/alpine/3.15.0/nginx.conf | 31 ++ nginx/1.21.6/alpine/3.15.0/support.sh | 17 + .../10-listen-on-ipv6-by-default.sh | 61 +++ .../20-envsubst-on-templates.sh | 32 ++ .../amazonlinux/2.0.20220218.1/Makefile | 233 ++++++++++ .../amazonlinux/2.0.20220218.1/default.conf | 44 ++ .../2.0.20220218.1/docker-entrypoint.sh | 40 ++ .../amazonlinux/2.0.20220218.1/nginx.conf | 31 ++ .../amazonlinux/2.0.20220218.1/support.sh | 17 + .../11.2/10-listen-on-ipv6-by-default.sh | 61 +++ .../debian/11.2/20-envsubst-on-templates.sh | 32 ++ nginx/1.21.6/debian/11.2/Makefile | 233 ++++++++++ nginx/1.21.6/debian/11.2/default.conf | 44 ++ nginx/1.21.6/debian/11.2/docker-entrypoint.sh | 40 ++ nginx/1.21.6/debian/11.2/nginx.conf | 31 ++ nginx/1.21.6/debian/11.2/support.sh | 17 + .../fedora/35/10-listen-on-ipv6-by-default.sh | 61 +++ .../fedora/35/20-envsubst-on-templates.sh | 32 ++ nginx/1.21.6/fedora/35/Makefile | 233 ++++++++++ nginx/1.21.6/fedora/35/default.conf | 44 ++ nginx/1.21.6/fedora/35/docker-entrypoint.sh | 40 ++ nginx/1.21.6/fedora/35/nginx.conf | 31 ++ nginx/1.21.6/fedora/35/support.sh | 17 + .../20.04/10-listen-on-ipv6-by-default.sh | 61 +++ .../ubuntu/20.04/20-envsubst-on-templates.sh | 32 ++ nginx/1.21.6/ubuntu/20.04/Makefile | 233 ++++++++++ nginx/1.21.6/ubuntu/20.04/default.conf | 44 ++ .../1.21.6/ubuntu/20.04/docker-entrypoint.sh | 40 ++ nginx/1.21.6/ubuntu/20.04/nginx.conf | 31 ++ nginx/1.21.6/ubuntu/20.04/support.sh | 17 + supported_versions | 2 +- 47 files changed, 3565 insertions(+), 246 deletions(-) create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/10-listen-on-ipv6-by-default.sh create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/20-envsubst-on-templates.sh create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/Dockerfile create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/Dockerfile-compat create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/Makefile create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/default.conf create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/docker-entrypoint.sh create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/nginx.conf create mode 100644 nginx/1.21.6/almalinux/8.5-20220306/support.sh create mode 100644 nginx/1.21.6/alpine/3.15.0/10-listen-on-ipv6-by-default.sh create mode 100644 nginx/1.21.6/alpine/3.15.0/20-envsubst-on-templates.sh create mode 100644 nginx/1.21.6/alpine/3.15.0/Makefile create mode 100644 nginx/1.21.6/alpine/3.15.0/default.conf create mode 100644 nginx/1.21.6/alpine/3.15.0/docker-entrypoint.sh create mode 100644 nginx/1.21.6/alpine/3.15.0/nginx.conf create mode 100644 nginx/1.21.6/alpine/3.15.0/support.sh create mode 100644 nginx/1.21.6/amazonlinux/2.0.20220218.1/10-listen-on-ipv6-by-default.sh create mode 100644 nginx/1.21.6/amazonlinux/2.0.20220218.1/20-envsubst-on-templates.sh create mode 100644 nginx/1.21.6/amazonlinux/2.0.20220218.1/Makefile create mode 100644 nginx/1.21.6/amazonlinux/2.0.20220218.1/default.conf create mode 100644 nginx/1.21.6/amazonlinux/2.0.20220218.1/docker-entrypoint.sh create mode 100644 nginx/1.21.6/amazonlinux/2.0.20220218.1/nginx.conf create mode 100644 nginx/1.21.6/amazonlinux/2.0.20220218.1/support.sh create mode 100644 nginx/1.21.6/debian/11.2/10-listen-on-ipv6-by-default.sh create mode 100644 nginx/1.21.6/debian/11.2/20-envsubst-on-templates.sh create mode 100644 nginx/1.21.6/debian/11.2/Makefile create mode 100644 nginx/1.21.6/debian/11.2/default.conf create mode 100644 nginx/1.21.6/debian/11.2/docker-entrypoint.sh create mode 100644 nginx/1.21.6/debian/11.2/nginx.conf create mode 100644 nginx/1.21.6/debian/11.2/support.sh create mode 100644 nginx/1.21.6/fedora/35/10-listen-on-ipv6-by-default.sh create mode 100644 nginx/1.21.6/fedora/35/20-envsubst-on-templates.sh create mode 100644 nginx/1.21.6/fedora/35/Makefile create mode 100644 nginx/1.21.6/fedora/35/default.conf create mode 100644 nginx/1.21.6/fedora/35/docker-entrypoint.sh create mode 100644 nginx/1.21.6/fedora/35/nginx.conf create mode 100644 nginx/1.21.6/fedora/35/support.sh create mode 100644 nginx/1.21.6/ubuntu/20.04/10-listen-on-ipv6-by-default.sh create mode 100644 nginx/1.21.6/ubuntu/20.04/20-envsubst-on-templates.sh create mode 100644 nginx/1.21.6/ubuntu/20.04/Makefile create mode 100644 nginx/1.21.6/ubuntu/20.04/default.conf create mode 100644 nginx/1.21.6/ubuntu/20.04/docker-entrypoint.sh create mode 100644 nginx/1.21.6/ubuntu/20.04/nginx.conf create mode 100644 nginx/1.21.6/ubuntu/20.04/support.sh diff --git a/README.md b/README.md index fd1305fd..64d8ca23 100644 --- a/README.md +++ b/README.md @@ -43,12 +43,6 @@ If you'd like to support this open-source project I'll appreciate any kind of [c ## Supported tags and respective `Dockerfile` links -- [`almalinux`, `1-almalinux`, `1.21-almalinux`, `1.21.6-almalinux`, `1-almalinux8.5-20211112`, `1.21-almalinux8.5-20211112`, `1.21.6-almalinux8.5-20211112`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/almalinux/8.5-20211112/Dockerfile) -- [`1`, `1.21`, `alpine`, `1.21.6`, `latest`, `1-alpine`, `1.21-alpine`, `1.21.6-alpine`, `1-alpine3.15.0`, `1.21-alpine3.15.0`, `1.21.6-alpine3.15.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/alpine/3.15.0/Dockerfile) -- [`amazonlinux`, `1-amazonlinux`, `1.21-amazonlinux`, `1.21.6-amazonlinux`, `1-amazonlinux2.0.20220121.0`, `1.21-amazonlinux2.0.20220121.0`, `1.21.6-amazonlinux2.0.20220121.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/amazonlinux/2.0.20220121.0/Dockerfile) -- [`debian`, `1-debian`, `1.21-debian`, `1-debian11.2`, `1.21.6-debian`, `1.21-debian11.2`, `1.21.6-debian11.2`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/debian/11.2/Dockerfile) -- [`fedora`, `1-fedora`, `1-fedora35`, `1.21-fedora`, `1.21-fedora35`, `1.21.6-fedora`, `1.21.6-fedora35`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/fedora/35/Dockerfile) -- [`ubuntu`, `1-ubuntu`, `1.21-ubuntu`, `1-ubuntu20.04`, `1.21.6-ubuntu`, `1.21-ubuntu20.04`, `1.21.6-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/ubuntu/20.04/Dockerfile) **Note:** The full list of supported/unsupported tags can be found on [`docs/TAGS.md`](https://github.com/fabiocicerchia/nginx-lua/blob/main/docs/TAGS.md). diff --git a/docs/TAGS.md b/docs/TAGS.md index 087836d1..e69de29b 100644 --- a/docs/TAGS.md +++ b/docs/TAGS.md @@ -1,239 +0,0 @@ -# Tags - -## Supported Tags - -- [`1.21.6-almalinux8.5-20211112`, `1.21.6-almalinux`, `1.21-almalinux8.5-20211112`, `1.21-almalinux`, `1-almalinux8.5-20211112`, `1-almalinux`, `almalinux`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/almalinux/8.5-20211112/Dockerfile) -- [`1-alpine`, `1`, `1.21-alpine`, `1.21`, `1.21-alpine3.15.0`, `1-alpine3.15.0`, `1.21.6-alpine3.15.0`, `1.21.6-alpine`, `1.21-6`, `alpine`, `latest`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/alpine/3.15.0/Dockerfile) -- [`1-amazonlinux`, `1.21-amazonlinux`, `1.21.6-amazonlinux`, `1.21.6-amazonlinux2.0.20220218.1`, `1.21-amazonlinux2.0.20220218.1`, `1-amazonlinux2.0.20220218.1`, `amazonlinux`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/amazonlinux/2.0.20220218.1/Dockerfile) -- [`1-debian`, `1.21-debian`, `1.21-debian11.2`, `1-debian11.2`, `1.21.6-debian11.2`, `1.21.6-debian`, `debian`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/debian/11.2/Dockerfile) -- [`1-fedora`, `1.21-fedora`, `1.21-fedora35`, `1-fedora35`, `1.21.6-fedora35`, `1.21.6-fedora`, `fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/fedora/35/Dockerfile) -- [`1-ubuntu`, `1-ubuntu20.04`, `1.21-ubuntu20.04`, `1.21-ubuntu`, `1.21.6-ubuntu20.04`, `1.21.6-ubuntu`, `ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/ubuntu/20.04/Dockerfile) - -## Unsupported Tags - -- [`1.21.6-amazonlinux2.0.20220121.0`, `1.21-amazonlinux2.0.20220121.0`, `1-amazonlinux2.0.20220121.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/amazonlinux/2.0.20220121.0/Dockerfile) -- [`1.21-amazonlinux2.0.20211223.0`, `1-amazonlinux2.0.20211223.0`, `1.21.6-amazonlinux2.0.20211223.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.6/amazonlinux/2.0.20211223.0/Dockerfile) -- [`1.21.5-ubuntu20.04`, `1.21.5-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.5/ubuntu/20.04/Dockerfile) -- [`1.21.5-fedora35`, `1.21.5-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.5/fedora/35/Dockerfile) -- [`1.21.5-debian11.2`, `1.21.5-debian`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.5/debian/11.2/Dockerfile) -- [`1.21.5-amazonlinux`, `1.21.5-amazonlinux2.0.20211223.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.5/amazonlinux/2.0.20211223.0/Dockerfile) -- [`1.21-amazonlinux2.0.20211201.0`, `1-amazonlinux2.0.20211201.0`, `1.21.5-amazonlinux2.0.20211201.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.5/amazonlinux/2.0.20211201.0/Dockerfile) -- [`1.21.5-alpine3.15.0`, `1.21.5-alpine`, `1.21-5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.5/alpine/3.15.0/Dockerfile) -- [`1.21.4-ubuntu20.04`, `1.21.4-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/ubuntu/20.04/Dockerfile) -- [`1.21.4-fedora35`, `1.21.4-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/fedora/35/Dockerfile) -- [`1.21.4-debian`, `1.21.4-debian11.2`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/debian/11.2/Dockerfile) -- [`1.21-debian11.1`, `1-debian11.1`, `1.21.4-debian11.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/debian/11.1/Dockerfile) -- [`1.21.4-amazonlinux`, `1.21.4-amazonlinux2.0.20211201.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/amazonlinux/2.0.20211201.0/Dockerfile) -- [`1.21-amazonlinux2.0.20211005.0`, `1-amazonlinux2.0.20211005.0`, `1.21.4-amazonlinux2.0.20211005.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/amazonlinux/2.0.20211005.0/Dockerfile) -- [`1.21.4-alpine`, `1.21-4`, `1.21.4-alpine3.15.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/alpine/3.15.0/Dockerfile) -- [`1.21.4-alpine3.14.3`, `1.21-alpine3.14.3`, `1-alpine3.14.3`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/alpine/3.14.3/Dockerfile) -- [`1.21-alpine3.14.2`, `1-alpine3.14.2`, `1.21.4-alpine3.14.2`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.4/alpine/3.14.2/Dockerfile) -- [`1.21.3-ubuntu20.04`, `1.21.3-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/ubuntu/20.04/Dockerfile) -- [`1.21.3-fedora`, `1.21.3-fedora35`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/fedora/35/Dockerfile) -- [`1-fedora34`, `1.21-fedora34`, `1.21.3-fedora34`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/fedora/34/Dockerfile) -- [`1.21.3-debian`, `1.21.3-debian11.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/debian/11.1/Dockerfile) -- [`1.21-debian11.0`, `1-debian11.0`, `1.21.3-debian11.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/debian/11.0/Dockerfile) -- [`1.21.3-amazonlinux`, `1.21.3-amazonlinux2.0.20211005.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/amazonlinux/2.0.20211005.0/Dockerfile) -- [`1.21.3-amazonlinux2.0.20211001.0`, `1.21-amazonlinux2.0.20211001.0`, `1-amazonlinux2.0.20211001.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/amazonlinux/2.0.20211001.0/Dockerfile) -- [`1.21-amazonlinux2.0.20210813.1`, `1-amazonlinux2.0.20210813.1`, `1.21.3-amazonlinux2.0.20210813.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/amazonlinux/2.0.20210813.1/Dockerfile) -- [`1.21.3-alpine3.14.2`, `1.21.3-alpine`, `1.21-3`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.3/alpine/3.14.2/Dockerfile) -- [`1.21.1-ubuntu20.04`, `1.21.1-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/ubuntu/20.04/Dockerfile) -- [`1.21.1-fedora34`, `1.21.1-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/fedora/34/Dockerfile) -- [`1.21.1-debian`, `1.21.1-debian11.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/debian/11.0/Dockerfile) -- [`1.21-debian10.10`, `1-debian10.10`, `1.21.1-debian10.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/debian/10.10/Dockerfile) -- [`1.21.1-amazonlinux`, `1.21.1-amazonlinux2.0.20210813.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/amazonlinux/2.0.20210813.1/Dockerfile) -- [`1.21.1-amazonlinux2.0.20210721.2`, `1.21-amazonlinux2.0.20210721.2`, `1-amazonlinux2.0.20210721.2`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/amazonlinux/2.0.20210721.2/Dockerfile) -- [`1.21.1-amazonlinux2.0.20210701.0`, `1.21-amazonlinux2.0.20210701.0`, `1-amazonlinux2.0.20210701.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/amazonlinux/2.0.20210701.0/Dockerfile) -- [`1.21-amazonlinux2.0.20210617.0`, `1-amazonlinux2.0.20210617.0`, `1.21.1-amazonlinux2.0.20210617.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/amazonlinux/2.0.20210617.0/Dockerfile) -- [`1.21.1-alpine`, `1.21-1`, `1.21.1-alpine3.14.2`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/alpine/3.14.2/Dockerfile) -- [`1.21.1-alpine3.14.1`, `1.21-alpine3.14.1`, `1-alpine3.14.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/alpine/3.14.1/Dockerfile) -- [`1.21-alpine3.14.0`, `1-alpine3.14.0`, `1.21.1-alpine3.14.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.1/alpine/3.14.0/Dockerfile) -- [`1.21.0-ubuntu20.04`, `1.21.0-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/ubuntu/20.04/Dockerfile) -- [`1.21.0-fedora34`, `1.21.0-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/fedora/34/Dockerfile) -- [`1.21.0-debian`, `1.21.0-debian10.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/debian/10.10/Dockerfile) -- [`1-debian10.9`, `1.21.0-debian10.9`, `1.21-debian10.9`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/debian/10.9/Dockerfile) -- [`1.21.0-amazonlinux`, `1.21.0-amazonlinux2.0.20210617.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/amazonlinux/2.0.20210617.0/Dockerfile) -- [`1.21.0-amazonlinux2.0.20210525.0`, `1.21-amazonlinux2.0.20210525.0`, `1-amazonlinux2.0.20210525.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/amazonlinux/2.0.20210525.0/Dockerfile) -- [`1-amazonlinux2.0.20210421.0`, `1.21.0-amazonlinux2.0.20210421.0`, `1.21-amazonlinux2.0.20210421.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/amazonlinux/2.0.20210421.0/Dockerfile) -- [`1.21.0-alpine`, `1.21-0`, `1.21.0-alpine3.14.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/alpine/3.14.0/Dockerfile) -- [`1-alpine3.13.5`, `1.21.0-alpine3.13.5`, `1.21-alpine3.13.5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.21.0/alpine/3.13.5/Dockerfile) -- [`1.20.0-ubuntu20.04`, `1.20.0-ubuntu`, `1.20-ubuntu20.04`, `1.20-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.20.0/ubuntu/20.04/Dockerfile) -- [`1.20.0-fedora`, `1.20-fedora`, `1.20.0-fedora34`, `1.20-fedora34`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.20.0/fedora/34/Dockerfile) -- [`1-fedora33`, `1.20.0-fedora33`, `1.20-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.20.0/fedora/33/Dockerfile) -- [`1.20.0-debian10.9`, `1.20.0-debian`, `1.20-debian10.9`, `1.20-debian`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.20.0/debian/10.9/Dockerfile) -- [`1.20.0-amazonlinux`, `1.20-amazonlinux`, `1.20.0-amazonlinux2.0.20210421.0`, `1.20-amazonlinux2.0.20210421.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.20.0/amazonlinux/2.0.20210421.0/Dockerfile) -- [`1-amazonlinux2.0.20210326.0`, `1.20.0-amazonlinux2.0.20210326.0`, `1.20-amazonlinux2.0.20210326.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.20.0/amazonlinux/2.0.20210326.0/Dockerfile) -- [`1.20.0-alpine3.13.5`, `1.20.0-alpine`, `1.20-0`, `1.20-alpine3.13.5`, `1.20-alpine`, `1.20`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.20.0/alpine/3.13.5/Dockerfile) -- [`1.19-ubuntu`, `1.19-ubuntu20.04`, `1.19.10-ubuntu20.04`, `1.19.10-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.10/ubuntu/20.04/Dockerfile) -- [`1.19-fedora`, `1.19-fedora33`, `1.19.10-fedora33`, `1.19.10-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.10/fedora/33/Dockerfile) -- [`1.19-debian`, `1.19-debian10.9`, `1.19.10-debian10.9`, `1.19.10-debian`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.10/debian/10.9/Dockerfile) -- [`1.19-amazonlinux`, `1.19-amazonlinux2.0.20210326.0`, `1.19.10-amazonlinux2.0.20210326.0`, `1.19.10-amazonlinux`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.10/amazonlinux/2.0.20210326.0/Dockerfile) -- [`1.19-alpine`, `1.19`, `1.19.10-alpine`, `1.19-10`, `1.19.10-alpine3.13.5`, `1.19-alpine3.13.5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.10/alpine/3.13.5/Dockerfile) -- [`1.19-alpine3.13.4`, `1-alpine3.13.4`, `1.19.10-alpine3.13.4`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.10/alpine/3.13.4/Dockerfile) -- [`1.19.9-ubuntu20.04`, `1.19.9-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.9/ubuntu/20.04/Dockerfile) -- [`1.19.9-fedora33`, `1.19.9-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.9/fedora/33/Dockerfile) -- [`1.19.9-debian10.9`, `1.19.9-debian`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.9/debian/10.9/Dockerfile) -- [`1.19.9-amazonlinux2.0.20210326.0`, `1.19.9-amazonlinux`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.9/amazonlinux/2.0.20210326.0/Dockerfile) -- [`1.19.9-alpine`, `1.19-9`, `1.19.9-alpine3.13.4`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.9/alpine/3.13.4/Dockerfile) -- [`1.19-alpine3.13.3`, `1-alpine3.13.3`, `1.19.9-alpine3.13.3`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.9/alpine/3.13.3/Dockerfile) -- [`1.19.8-ubuntu20.04`, `1.19.8-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.8/ubuntu/20.04/Dockerfile) -- [`1.19.8-fedora33`, `1.19.8-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.8/fedora/33/Dockerfile) -- [`1.19-debian10.8`, `1-debian10.8`, `1.19.8-debian10.8`, `1.19.8-debian`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.8/debian/10.8/Dockerfile) -- [`1.19-amazonlinux2.0.20210219.0`, `1-amazonlinux2.0.20210219.0`, `1.19.8-amazonlinux2.0.20210219.0`, `1.19.8-amazonlinux`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.8/amazonlinux/2.0.20210219.0/Dockerfile) -- [`1.19.8-alpine`, `1.19-8`, `1.19.8-alpine3.13.3`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.8/alpine/3.13.3/Dockerfile) -- [`1.19-alpine3.13.2`, `1-alpine3.13.2`, `1.19.8-alpine3.13.2`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.8/alpine/3.13.2/Dockerfile) -- [`1.19.7-ubuntu20.04`, `1.19.7-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/ubuntu/20.04/Dockerfile) -- [`1.19.7-fedora33`, `1.19.7-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/fedora/33/Dockerfile) -- [`1.19.7-debian10.8`, `1.19.7-debian`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/debian/10.8/Dockerfile) -- [`1.19.7-amazonlinux`, `1.19.7-amazonlinux2.0.20210219.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/amazonlinux/2.0.20210219.0/Dockerfile) -- [`1.19-amazonlinux2.0.20210126.0`, `1-amazonlinux2.0.20210126.0`, `1.19.7-amazonlinux2.0.20210126.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/amazonlinux/2.0.20210126.0/Dockerfile) -- [`1.19.7-alpine3.13.2`, `1.19.7-alpine`, `1.19-7`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.7/alpine/3.13.2/Dockerfile) -- [`1.19.6-ubuntu20.04`, `1.19.6-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/ubuntu/20.04/Dockerfile) -- [`1.19.6-fedora33`, `1.19.6-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/fedora/33/Dockerfile) -- [`1.19.6-debian`, `1.19.6-debian10.8`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/debian/10.8/Dockerfile) -- [`1.19-debian10.7`, `1-debian10.7`, `1.19.6-debian10.7`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/debian/10.7/Dockerfile) -- [`1-centos`, `1.19-centos`, `1.19-centos8`, `1-centos8`, `1.19.6-centos8`, `1.19.6-centos`, `centos`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/centos/8/Dockerfile) -- [`1.19.6-amazonlinux`, `1.19.6-amazonlinux2.0.20210126.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/amazonlinux/2.0.20210126.0/Dockerfile) -- [`1.19.6-amazonlinux2.0.20201218.1`, `1.19-amazonlinux2.0.20201218.1`, `1-amazonlinux2.0.20201218.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/amazonlinux/2.0.20201218.1/Dockerfile) -- [`1.19.6-amazonlinux2.0.20201111.0`, `1.19-amazonlinux2.0.20201111.0`, `1-amazonlinux2.0.20201111.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/amazonlinux/2.0.20201111.0/Dockerfile) -- [`1.19-amazonlinux2.0.20200722.0`, `1-amazonlinux2.0.20200722.0`, `1.19.6-amazonlinux2.0.20200722.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/amazonlinux/2.0.20200722.0/Dockerfile) -- [`1.19.6-alpine`, `1.19-6`, `1.19.6-alpine3.13.1`, `1.19-alpine3.13.1`, `1-alpine3.13.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/alpine/3.13.1/Dockerfile) -- [`1.19.6-alpine3.13.0`, `1.19-alpine3.13.0`, `1-alpine3.13.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/alpine/3.13.0/Dockerfile) -- [`1.19.6-alpine3.12.3`, `1.19-alpine3.12.3`, `1-alpine3.12.3`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/alpine/3.12.3/Dockerfile) -- [`1.19-alpine3.12.2`, `1-alpine3.12.2`, `1.19.6-alpine3.12.2`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.6/alpine/3.12.2/Dockerfile) -- [`1.19.5-ubuntu20.04`, `1.19.5-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.5/ubuntu/20.04/Dockerfile) -- [`1.19.5-fedora33`, `1.19.5-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.5/fedora/33/Dockerfile) -- [`1.19.5-debian`, `1.19.5-debian10.7`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.5/debian/10.7/Dockerfile) -- [`1.19-debian10.6`, `1-debian10.6`, `1.19.5-debian10.6`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.5/debian/10.6/Dockerfile) -- [`1.19.5-centos8`, `1.19.5-centos`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.5/centos/8/Dockerfile) -- [`1.19.5-amazonlinux2.0.20200722.0`, `1.19.5-amazonlinux`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.5/amazonlinux/2.0.20200722.0/Dockerfile) -- [`1.19.5-alpine`, `1.19-5`, `1.19.5-alpine3.12.2`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.5/alpine/3.12.2/Dockerfile) -- [`1.19-alpine3.12.1`, `1-alpine3.12.1`, `1.19.5-alpine3.12.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.5/alpine/3.12.1/Dockerfile) -- [`1.19.4-ubuntu20.04`, `1.19.4-ubuntu`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.4/ubuntu/20.04/Dockerfile) -- [`1.19.4-fedora33`, `1.19.4-fedora`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.4/fedora/33/Dockerfile) -- [`1.19.4-debian10.6`, `1.19.4-debian`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.4/debian/10.6/Dockerfile) -- [`1.19.4-centos8`, `1.19.4-centos`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.4/centos/8/Dockerfile) -- [`1.19.4-amazonlinux2.0.20200722.0`, `1.19.4-amazonlinux`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.4/amazonlinux/2.0.20200722.0/Dockerfile) -- [`1.19.4-alpine3.12.1`, `1.19.4-alpine`, `1.19-4`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.4/alpine/3.12.1/Dockerfile) -- [`1-ubuntu20.10`, `1.19-ubuntu20.10`, `1.19.3-ubuntu`, `1.19.3-ubuntu20.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/ubuntu/20.10/Dockerfile) -- [`1.19.3-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/ubuntu/20.04/Dockerfile) -- [`1.19-fedora34`, `1.19.3-fedora`, `1.19.3-fedora34`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/fedora/34/Dockerfile) -- [`1.19.3-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/fedora/33/Dockerfile) -- [`1.19.3-debian`, `1.19.3-debian10.6`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/debian/10.6/Dockerfile) -- [`1.19.3-debian10.6-slim`, `1.19-debian10.6-slim`, `1-debian10.6-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/debian/10.6-slim/Dockerfile) -- [`1.19-debian10.5-slim`, `1-debian10.5-slim`, `1.19.3-debian10.5-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/debian/10.5-slim/Dockerfile) -- [`1-debian10.4-slim`, `1.19-debian10.4-slim`, `1.19.3-debian10.4-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/debian/10.4-slim/Dockerfile) -- [`1.19.3-centos`, `1.19.3-centos8`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/centos/8/Dockerfile) -- [`1-centos8.2.2004`, `1.19-centos8.2.2004`, `1.19.3-centos8.2.2004`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/centos/8.2.2004/Dockerfile) -- [`1-centos8.1.1911`, `1.19-centos8.1.1911`, `1.19.3-centos8.1.1911`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/centos/8.1.1911/Dockerfile) -- [`1.19.3-amazonlinux`, `1.19.3-amazonlinux2.0.20200722.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/amazonlinux/2.0.20200722.0/Dockerfile) -- [`1.19-amazonlinux2.0.20200602.0`, `1-amazonlinux2.0.20200602.0`, `1.19.3-amazonlinux2.0.20200602.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/amazonlinux/2.0.20200602.0/Dockerfile) -- [`1.19.3-alpine`, `1.19-3`, `1.19.3-alpine3.12.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/alpine/3.12.1/Dockerfile) -- [`1-alpine3.12.0`, `1.19-alpine3.12.0`, `1.19.3-alpine3.12.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/alpine/3.12.0/Dockerfile) -- [`1-alpine3.11.6`, `1.19-alpine3.11.6`, `1.19.3-alpine3.11.6`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.3/alpine/3.11.6/Dockerfile) -- [`1.19.2-ubuntu`, `1.19.2-ubuntu20.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/ubuntu/20.10/Dockerfile) -- [`1.19.2-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/ubuntu/20.04/Dockerfile) -- [`1.19.2-fedora`, `1.19.2-fedora34`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/fedora/34/Dockerfile) -- [`1.19.2-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/fedora/33/Dockerfile) -- [`1-fedora32`, `1.19-fedora32`, `1.19.2-fedora32`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/fedora/32/Dockerfile) -- [`1.19.2-debian`, `1.19.2-debian10.5-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/debian/10.5-slim/Dockerfile) -- [`1.19.2-debian10.4-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/debian/10.4-slim/Dockerfile) -- [`1.19.2-centos`, `1.19.2-centos8.2.2004`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/centos/8.2.2004/Dockerfile) -- [`1.19.2-centos8.1.1911`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/centos/8.1.1911/Dockerfile) -- [`1.19.2-amazonlinux`, `1.19.2-amazonlinux2.0.20200722.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/amazonlinux/2.0.20200722.0/Dockerfile) -- [`1.19.2-amazonlinux2.0.20200602.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/amazonlinux/2.0.20200602.0/Dockerfile) -- [`1.19.2-alpine`, `1.19-2`, `1.19.2-alpine3.12.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/alpine/3.12.0/Dockerfile) -- [`1.19.2-alpine3.11.6`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.2/alpine/3.11.6/Dockerfile) -- [`1.19.1-ubuntu`, `1.19.1-ubuntu20.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/ubuntu/20.10/Dockerfile) -- [`1.19.1-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/ubuntu/20.04/Dockerfile) -- [`1.19.1-fedora`, `1.19.1-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/fedora/33/Dockerfile) -- [`1.19.1-fedora32`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/fedora/32/Dockerfile) -- [`1.19.1-debian`, `1.19.1-debian10.5-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/debian/10.5-slim/Dockerfile) -- [`1.19.1-debian10.4-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/debian/10.4-slim/Dockerfile) -- [`1-debian10.3-slim`, `1.19-debian10.3-slim`, `1.19.1-debian10.3-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/debian/10.3-slim/Dockerfile) -- [`1.19.1-centos`, `1.19.1-centos8.2.2004`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/centos/8.2.2004/Dockerfile) -- [`1.19.1-centos8.1.1911`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/centos/8.1.1911/Dockerfile) -- [`1.19.1-amazonlinux`, `1.19.1-amazonlinux2.0.20200722.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/amazonlinux/2.0.20200722.0/Dockerfile) -- [`1.19.1-amazonlinux2.0.20200602.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/amazonlinux/2.0.20200602.0/Dockerfile) -- [`1-amazonlinux2.0.20200406.0`, `1.19-amazonlinux2.0.20200406.0`, `1.19.1-amazonlinux2.0.20200406.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/amazonlinux/2.0.20200406.0/Dockerfile) -- [`1.19.1-alpine`, `1.19-1`, `1.19.1-alpine3.12.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/alpine/3.12.0/Dockerfile) -- [`1.19.1-alpine3.11.6`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.1/alpine/3.11.6/Dockerfile) -- [`1.19.0-ubuntu`, `1.19.0-ubuntu20.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/ubuntu/20.10/Dockerfile) -- [`1.19.0-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/ubuntu/20.04/Dockerfile) -- [`1-ubuntu19.10`, `1.19.0-ubuntu19.10`, `1.19-ubuntu19.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/ubuntu/19.10/Dockerfile) -- [`1-ubuntu18.04`, `1.19.0-ubuntu18.04`, `1.19-ubuntu18.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/ubuntu/18.04/Dockerfile) -- [`1.19.0-fedora`, `1.19.0-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/fedora/33/Dockerfile) -- [`1.19.0-fedora32`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/fedora/32/Dockerfile) -- [`1-fedora31`, `1.19.0-fedora31`, `1.19-fedora31`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/fedora/31/Dockerfile) -- [`1-fedora30`, `1.19.0-fedora30`, `1.19-fedora30`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/fedora/30/Dockerfile) -- [`1-fedora29`, `1.19.0-fedora29`, `1.19-fedora29`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/fedora/29/Dockerfile) -- [`1.19.0-debian`, `1.19.0-debian10.4-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/debian/10.4-slim/Dockerfile) -- [`1.19.0-debian10.3-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/debian/10.3-slim/Dockerfile) -- [`1-debian10.2-slim`, `1.19.0-debian10.2-slim`, `1.19-debian10.2-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/debian/10.2-slim/Dockerfile) -- [`1-debian9.12-slim`, `1.19.0-debian9.12-slim`, `1.19-debian9.12-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/debian/9.12-slim/Dockerfile) -- [`1-debian8.11-slim`, `1.19.0-debian8.11-slim`, `1.19-debian8.11-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/debian/8.11-slim/Dockerfile) -- [`1.19.0-centos`, `1.19.0-centos8.2.2004`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/centos/8.2.2004/Dockerfile) -- [`1.19.0-centos8.1.1911`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/centos/8.1.1911/Dockerfile) -- [`1-centos7.8.2003`, `1.19.0-centos7.8.2003`, `1.19-centos7.8.2003`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/centos/7.8.2003/Dockerfile) -- [`1-amazonlinux2018.03.0.20200318.1`, `1.19.0-amazonlinux`, `1.19.0-amazonlinux2018.03.0.20200318.1`, `1.19-amazonlinux2018.03.0.20200318.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/amazonlinux/2018.03.0.20200318.1/Dockerfile) -- [`1.19.0-amazonlinux2.0.20200406.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/amazonlinux/2.0.20200406.0/Dockerfile) -- [`1.19.0-amazonlinux2.0.20200304.0`, `1.19-amazonlinux2.0.20200304.0`, `1-amazonlinux2.0.20200304.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/amazonlinux/2.0.20200304.0/Dockerfile) -- [`1-amazonlinux2.0.20181010`, `1.19.0-amazonlinux2.0.20181010`, `1.19-amazonlinux2.0.20181010`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/amazonlinux/2.0.20181010/Dockerfile) -- [`1-amazonlinux2.0.20180827`, `1.19.0-amazonlinux2.0.20180827`, `1.19-amazonlinux2.0.20180827`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/amazonlinux/2.0.20180827/Dockerfile) -- [`1-amazonlinux2.0.20180622.1`, `1.19.0-amazonlinux2.0.20180622.1`, `1.19-amazonlinux2.0.20180622.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/amazonlinux/2.0.20180622.1/Dockerfile) -- [`1.19.0-alpine`, `1.19-0`, `1.19.0-alpine3.12.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/alpine/3.12.0/Dockerfile) -- [`1.19.0-alpine3.11.6`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/alpine/3.11.6/Dockerfile) -- [`1-alpine3.11.5`, `1.19.0-alpine3.11.5`, `1.19-alpine3.11.5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/alpine/3.11.5/Dockerfile) -- [`1-alpine3.10.5`, `1.19.0-alpine3.10.5`, `1.19-alpine3.10.5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.19.0/alpine/3.10.5/Dockerfile) -- [`1.18.0-ubuntu`, `1.18-ubuntu`, `1.18.0-ubuntu20.10`, `1.18-ubuntu20.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/ubuntu/20.10/Dockerfile) -- [`1.18.0-ubuntu20.04`, `1.18-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/ubuntu/20.04/Dockerfile) -- [`1.18.0-ubuntu19.10`, `1.18-ubuntu19.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/ubuntu/19.10/Dockerfile) -- [`1.18.0-ubuntu18.04`, `1.18-ubuntu18.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/ubuntu/18.04/Dockerfile) -- [`1.18.0-fedora`, `1.18-fedora`, `1.18.0-fedora33`, `1.18-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/fedora/33/Dockerfile) -- [`1.18.0-fedora32`, `1.18-fedora32`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/fedora/32/Dockerfile) -- [`1.18.0-fedora31`, `1.18-fedora31`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/fedora/31/Dockerfile) -- [`1.18.0-fedora30`, `1.18-fedora30`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/fedora/30/Dockerfile) -- [`1.18.0-fedora29`, `1.18-fedora29`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/fedora/29/Dockerfile) -- [`1.18.0-debian`, `1.18-debian`, `1.18.0-debian10.4-slim`, `1.18-debian10.4-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/debian/10.4-slim/Dockerfile) -- [`1.18.0-debian10.3-slim`, `1.18-debian10.3-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/debian/10.3-slim/Dockerfile) -- [`1.18.0-debian10.2-slim`, `1.18-debian10.2-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/debian/10.2-slim/Dockerfile) -- [`1.18.0-debian9.12-slim`, `1.18-debian9.12-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/debian/9.12-slim/Dockerfile) -- [`1.18.0-debian8.11-slim`, `1.18-debian8.11-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/debian/8.11-slim/Dockerfile) -- [`1.18.0-centos`, `1.18-centos`, `1.18.0-centos8.2.2004`, `1.18-centos8.2.2004`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/centos/8.2.2004/Dockerfile) -- [`1.18.0-centos8.1.1911`, `1.18-centos8.1.1911`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/centos/8.1.1911/Dockerfile) -- [`1.18.0-centos7.8.2003`, `1.18-centos7.8.2003`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/centos/7.8.2003/Dockerfile) -- [`1.18.0-amazonlinux`, `1.18.0-amazonlinux2018.03.0.20200318.1`, `1.18-amazonlinux2018.03.0.20200318.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/amazonlinux/2018.03.0.20200318.1/Dockerfile) -- [`1.18-amazonlinux`, `1.18.0-amazonlinux2.0.20200406.0`, `1.18-amazonlinux2.0.20200406.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/amazonlinux/2.0.20200406.0/Dockerfile) -- [`1.18.0-amazonlinux2.0.20181010`, `1.18-amazonlinux2.0.20181010`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/amazonlinux/2.0.20181010/Dockerfile) -- [`1.18.0-amazonlinux2.0.20180827`, `1.18-amazonlinux2.0.20180827`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/amazonlinux/2.0.20180827/Dockerfile) -- [`1.18.0-amazonlinux2.0.20180622.1`, `1.18-amazonlinux2.0.20180622.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/amazonlinux/2.0.20180622.1/Dockerfile) -- [`1.18.0-alpine`, `1.18-0`, `1.18-alpine`, `1.18`, `1.18.0-alpine3.12.0`, `1.18-alpine3.12.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/alpine/3.12.0/Dockerfile) -- [`1.18.0-alpine3.11.6`, `1.18-alpine3.11.6`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/alpine/3.11.6/Dockerfile) -- [`1.18.0-alpine3.11.5`, `1.18-alpine3.11.5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/alpine/3.11.5/Dockerfile) -- [`1.18.0-alpine3.10.5`, `1.18-alpine3.10.5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.18.0/alpine/3.10.5/Dockerfile) -- [`1.17.10-ubuntu`, `1.17-ubuntu`, `1.17.10-ubuntu20.10`, `1.17-ubuntu20.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/ubuntu/20.10/Dockerfile) -- [`1.17.10-ubuntu20.04`, `1.17-ubuntu20.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/ubuntu/20.04/Dockerfile) -- [`1.17.10-ubuntu19.10`, `1.17-ubuntu19.10`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/ubuntu/19.10/Dockerfile) -- [`1.17.10-ubuntu18.04`, `1.17-ubuntu18.04`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/ubuntu/18.04/Dockerfile) -- [`1.17.10-fedora`, `1.17-fedora`, `1.17.10-fedora33`, `1.17-fedora33`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/fedora/33/Dockerfile) -- [`1.17.10-fedora32`, `1.17-fedora32`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/fedora/32/Dockerfile) -- [`1.17.10-fedora31`, `1.17-fedora31`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/fedora/31/Dockerfile) -- [`1.17.10-fedora30`, `1.17-fedora30`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/fedora/30/Dockerfile) -- [`1.17.10-fedora29`, `1.17-fedora29`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/fedora/29/Dockerfile) -- [`1.17.10-debian`, `1.17-debian`, `1.17.10-debian10.4-slim`, `1.17-debian10.4-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/debian/10.4-slim/Dockerfile) -- [`1.17.10-debian10.3-slim`, `1.17-debian10.3-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/debian/10.3-slim/Dockerfile) -- [`1.17.10-debian10.2-slim`, `1.17-debian10.2-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/debian/10.2-slim/Dockerfile) -- [`1.17.10-debian9.12-slim`, `1.17-debian9.12-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/debian/9.12-slim/Dockerfile) -- [`1.17.10-debian8.11-slim`, `1.17-debian8.11-slim`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/debian/8.11-slim/Dockerfile) -- [`1.17.10-centos`, `1.17-centos`, `1.17.10-centos8.2.2004`, `1.17-centos8.2.2004`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/centos/8.2.2004/Dockerfile) -- [`1.17.10-centos8.1.1911`, `1.17-centos8.1.1911`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/centos/8.1.1911/Dockerfile) -- [`1.17.10-centos7.8.2003`, `1.17-centos7.8.2003`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/centos/7.8.2003/Dockerfile) -- [`1.17.10-amazonlinux`, `1.17.10-amazonlinux2018.03.0.20200318.1`, `1.17-amazonlinux2018.03.0.20200318.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/amazonlinux/2018.03.0.20200318.1/Dockerfile) -- [`1.17-amazonlinux`, `1.17.10-amazonlinux2.0.20200406.0`, `1.17-amazonlinux2.0.20200406.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/amazonlinux/2.0.20200406.0/Dockerfile) -- [`1.17.10-amazonlinux2.0.20181010`, `1.17-amazonlinux2.0.20181010`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/amazonlinux/2.0.20181010/Dockerfile) -- [`1.17.10-amazonlinux2.0.20180827`, `1.17-amazonlinux2.0.20180827`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/amazonlinux/2.0.20180827/Dockerfile) -- [`1.17.10-amazonlinux2.0.20180622.1`, `1.17-amazonlinux2.0.20180622.1`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/amazonlinux/2.0.20180622.1/Dockerfile) -- [`1.17.10-alpine`, `1.17-10`, `1.17-alpine`, `1.17`, `1.17.10-alpine3.12.0`, `1.17-alpine3.12.0`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/alpine/3.12.0/Dockerfile) -- [`1.17.10-alpine3.11.6`, `1.17-alpine3.11.6`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/alpine/3.11.6/Dockerfile) -- [`1.17.10-alpine3.11.5`, `1.17-alpine3.11.5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/alpine/3.11.5/Dockerfile) -- [`1.17.10-alpine3.10.5`, `1.17-alpine3.10.5`](https://github.com/fabiocicerchia/nginx-lua/blob/main/nginx/1.17.10/alpine/3.10.5/Dockerfile) diff --git a/nginx/1.21.6/almalinux/8.5-20220306/10-listen-on-ipv6-by-default.sh b/nginx/1.21.6/almalinux/8.5-20220306/10-listen-on-ipv6-by-default.sh new file mode 100644 index 00000000..cd5190db --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/10-listen-on-ipv6-by-default.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +set -e + +ME=$(basename $0) +DEFAULT_CONF_FILE="etc/nginx/conf.d/default.conf" + +# check if we have ipv6 available +if [ ! -f "/proc/net/if_inet6" ]; then + echo >&3 "$ME: error: ipv6 not available" + exit 0 +fi + +if [ ! -f "/$DEFAULT_CONF_FILE" ]; then + echo >&3 "$ME: error: /$DEFAULT_CONF_FILE is not a file or does not exist" + exit 0 +fi + +# check if the file can be modified, e.g. not on a r/o filesystem +touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: error: can not modify /$DEFAULT_CONF_FILE (read-only file system?)"; exit 0; } + +# check if the file is already modified, e.g. on a container restart +grep -q "listen \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: error: IPv6 listen already enabled"; exit 0; } + +if [ -f "/etc/os-release" ]; then + . /etc/os-release +else + echo >&3 "$ME: error: can not guess the operating system" + exit 0 +fi + +echo >&3 "$ME: Getting the checksum of /$DEFAULT_CONF_FILE" + +#case "$ID" in +# "debian") +# CHECKSUM=$(dpkg-query --show --showformat='${Conffiles}\n' nginx | grep $DEFAULT_CONF_FILE | cut -d' ' -f 3) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | md5sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packaged version" +# exit 0 +# } +# ;; +# "alpine") +# CHECKSUM=$(apk manifest nginx 2>/dev/null| grep $DEFAULT_CONF_FILE | cut -d' ' -f 1 | cut -d ':' -f 2) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | sha1sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packages version" +# exit 0 +# } +# ;; +# *) +# echo >&3 "$ME: error: Unsupported distribution" +# exit 0 +# ;; +#esac + +# enable ipv6 on default.conf listen sockets +sed -i -E 's,listen 80;,listen 80;\n listen [::]:80;,' /$DEFAULT_CONF_FILE + +echo >&3 "$ME: Enabled listen on IPv6 in /$DEFAULT_CONF_FILE" + +exit 0 diff --git a/nginx/1.21.6/almalinux/8.5-20220306/20-envsubst-on-templates.sh b/nginx/1.21.6/almalinux/8.5-20220306/20-envsubst-on-templates.sh new file mode 100644 index 00000000..4f330295 --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/20-envsubst-on-templates.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +ME=$(basename $0) + +auto_envsubst() { + local template_dir="${NGINX_ENVSUBST_TEMPLATE_DIR:-/etc/nginx/templates}" + local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}" + local output_dir="${NGINX_ENVSUBST_OUTPUT_DIR:-/etc/nginx/conf.d}" + + local template defined_envs relative_path output_path subdir + defined_envs=$(printf '${%s} ' $(env | cut -d= -f1)) + [ -d "$template_dir" ] || return 0 + if [ ! -w "$output_dir" ]; then + echo >&3 "$ME: ERROR: $template_dir exists, but $output_dir is not writable" + return 0 + fi + find "$template_dir" -follow -type f -name "*$suffix" -print | while read -r template; do + relative_path="${template#$template_dir/}" + output_path="$output_dir/${relative_path%$suffix}" + subdir=$(dirname "$relative_path") + # create a subdirectory where the template file exists + mkdir -p "$output_dir/$subdir" + echo >&3 "$ME: Running envsubst on $template to $output_path" + envsubst "$defined_envs" < "$template" > "$output_path" + done +} + +auto_envsubst + +exit 0 diff --git a/nginx/1.21.6/almalinux/8.5-20220306/Dockerfile b/nginx/1.21.6/almalinux/8.5-20220306/Dockerfile new file mode 100644 index 00000000..3ca78c26 --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/Dockerfile @@ -0,0 +1,407 @@ +# __ __ +# .-----.-----.|__|.-----.--.--.______| |.--.--.---.-. +# | | _ || || |_ _|______| || | | _ | +# |__|__|___ ||__||__|__|__.__| |__||_____|___._| +# |_____| +# +# Copyright (c) 2022 Fabio Cicerchia. https://fabiocicerchia.it. MIT License +# Repo: https://github.com/fabiocicerchia/nginx-lua + +ARG ARCH= +ARG DISTRO=almalinux +ARG DISTRO_VER=8.5-20220306 + +############################# +# Settings Common Variables # +############################# +FROM ${ARCH}/$DISTRO:$DISTRO_VER AS base + +ARG ARCH= +ENV ARCH=$ARCH + +ENV DOCKER_IMAGE=fabiocicerchia/nginx-lua +ENV DOCKER_IMAGE_OS=${DISTRO} +ENV DOCKER_IMAGE_TAG=${DISTRO_VER} + +ARG BUILD_DATE +ENV BUILD_DATE=$BUILD_DATE +ARG VCS_REF +ENV VCS_REF=$VCS_REF + +# lua +ARG VER_LUA=5.3.4 +ENV VER_LUA=$VER_LUA + +# ngx_devel_kit +# https://github.com/vision5/ngx_devel_kit/releases +# The NDK is now considered to be stable. +ARG VER_NGX_DEVEL_KIT=0.3.1 +ENV VER_NGX_DEVEL_KIT=$VER_NGX_DEVEL_KIT + +# luajit2 +# https://github.com/openresty/luajit2/releases +ARG VER_LUAJIT=2.1-20211210 +ENV VER_LUAJIT=$VER_LUAJIT +ARG LUAJIT_LIB=/usr/local/lib +ENV LUAJIT_LIB=$LUAJIT_LIB +ARG LUAJIT_INC=/usr/local/include/luajit-2.1 +ENV LUAJIT_INC=$LUAJIT_INC +ARG LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH + +# lua-nginx-module +# https://github.com/openresty/lua-nginx-module/tags +# Production ready. +ARG VER_LUA_NGINX_MODULE=0.10.20 +ENV VER_LUA_NGINX_MODULE=$VER_LUA_NGINX_MODULE + +# lua-resty-core +# https://github.com/openresty/lua-resty-core/tags +# This library is production ready. +ARG VER_LUA_RESTY_CORE=0.1.22 +ENV VER_LUA_RESTY_CORE=$VER_LUA_RESTY_CORE +ARG LUA_LIB_DIR=/usr/local/share/lua/5.1 +ENV LUA_LIB_DIR=$LUA_LIB_DIR + +# lua-resty-lrucache +# https://github.com/openresty/lua-resty-lrucache/tags +# This library is considered production ready. +ARG VER_LUA_RESTY_LRUCACHE=0.11 +ENV VER_LUA_RESTY_LRUCACHE=$VER_LUA_RESTY_LRUCACHE + +# headers-more-nginx-module +# https://github.com/openresty/headers-more-nginx-module/commits/master +ARG VER_OPENRESTY_HEADERS=a4a0686605161a6777d7d612d5aef79b9e7c13e0 +ENV VER_OPENRESTY_HEADERS=$VER_OPENRESTY_HEADERS + +# lua-resty-cookie +# https://github.com/cloudflare/lua-resty-cookie/commits/master +ARG VER_CLOUDFLARE_COOKIE=99be1005e38ce19ace54515272a2be1b9fdc5da2 +ENV VER_CLOUDFLARE_COOKIE=$VER_CLOUDFLARE_COOKIE + +# lua-resty-dns +# https://github.com/openresty/lua-resty-dns/tags +ARG VER_OPENRESTY_DNS=0.22 +ENV VER_OPENRESTY_DNS=$VER_OPENRESTY_DNS + +# lua-resty-memcached +# https://github.com/openresty/lua-resty-memcached/tags +ARG VER_OPENRESTY_MEMCACHED=0.16 +ENV VER_OPENRESTY_MEMCACHED=$VER_OPENRESTY_MEMCACHED + +# lua-resty-mysql +# https://github.com/openresty/lua-resty-mysql/tags +ARG VER_OPENRESTY_MYSQL=0.24 +ENV VER_OPENRESTY_MYSQL=$VER_OPENRESTY_MYSQL + +# lua-resty-redis +# https://github.com/openresty/lua-resty-redis/releases +ARG VER_OPENRESTY_REDIS=0.29 +ENV VER_OPENRESTY_REDIS=$VER_OPENRESTY_REDIS + +# lua-resty-shell +# https://github.com/openresty/lua-resty-shell/tags +ARG VER_OPENRESTY_SHELL=0.03 +ENV VER_OPENRESTY_SHELL=$VER_OPENRESTY_SHELL + +# lua-resty-signal +# https://github.com/openresty/lua-resty-signal/releases +ARG VER_OPENRESTY_SIGNAL=0.03 +ENV VER_OPENRESTY_SIGNAL=$VER_OPENRESTY_SIGNAL + +# lua-tablepool +# https://github.com/openresty/lua-tablepool/releases +ARG VER_OPENRESTY_TABLEPOOL=0.02 +ENV VER_OPENRESTY_TABLEPOOL=$VER_OPENRESTY_TABLEPOOL + +# lua-resty-upstream-healthcheck +# https://github.com/openresty/lua-resty-upstream-healthcheck/tags +ARG VER_OPENRESTY_HEALTHCHECK=0.06 +ENV VER_OPENRESTY_HEALTHCHECK=$VER_OPENRESTY_HEALTHCHECK + +# lua-resty-websocket +# https://github.com/openresty/lua-resty-websocket/tags +ARG VER_OPENRESTY_WEBSOCKET=0.08 +ENV VER_OPENRESTY_WEBSOCKET=$VER_OPENRESTY_WEBSOCKET + +# lua-rocks +# https://luarocks.github.io/luarocks/releases/ +ARG VER_LUAROCKS=3.8.0 +ENV VER_LUAROCKS=$VER_LUAROCKS + +# lua-upstream-nginx-module +# https://github.com/openresty/lua-upstream-nginx-module/tags +ARG VER_LUA_UPSTREAM=0.07 +ENV VER_LUA_UPSTREAM=$VER_LUA_UPSTREAM + +# nginx-lua-prometheus +# https://github.com/knyar/nginx-lua-prometheus/tags +ARG VER_PROMETHEUS=0.20210206 +ENV VER_PROMETHEUS=$VER_PROMETHEUS + +# stream-lua-nginx-module +# https://github.com/openresty/stream-lua-nginx-module/tags +ARG VER_OPENRESTY_STREAMLUA=0.0.10 +ENV VER_OPENRESTY_STREAMLUA=$VER_OPENRESTY_STREAMLUA + +# https://github.com/nginx/nginx/releases +ARG VER_NGINX=1.21.6 +ENV VER_NGINX=$VER_NGINX +# References: +# - https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc +# - https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +# -g Generate debugging information +# -O2 Recommended optimizations +# -fstack-protector-strong Stack smashing protector +# -Wformat Check calls to make sure that the arguments supplied have types appropriate to the format string specified +# -Werror=format-security Reject potentially unsafe format string arguents +# -Wp,-D_FORTIFY_SOURCE=2 Run-time buffer overflow detection +# -fPIC No text relocations +ARG NGX_CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC" +ENV NGX_CFLAGS=$NGX_CFLAGS +# References +# - https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc +# - https://wiki.debian.org/ToolChain/DSOLinking#Unresolved_symbols_in_shared_libraries +# - https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html +# - https://linux.die.net/man/1/ld +# -Wl,-rpath,/usr/local/lib Add a directory to the runtime library search path +# -Wl,-z,relro Read-only segments after relocation +# -Wl,-z,now Disable lazy binding +# -Wl,--as-needed Only link with needed libraries +# -pie Full ASLR for executables +ARG NGX_LDOPT="-Wl,-rpath,/usr/local/lib -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie" +ENV NGX_LDOPT=$NGX_LDOPT +# Reference: http://nginx.org/en/docs/configure.html +# NOTE: Almalinux is building with PCRE instead of PCRE2 mostly due to +# https://github.com/openresty/lua-nginx-module/issues/1984. +# More details on it: https://github.com/fabiocicerchia/nginx-lua/pull/40 +ARG NGINX_BUILD_CONFIG="\ + --prefix=/etc/nginx \ + --sbin-path=/usr/sbin/nginx \ + --modules-path=/usr/lib/nginx/modules \ + --conf-path=/etc/nginx/nginx.conf \ + --error-log-path=/var/log/nginx/error.log \ + --http-log-path=/var/log/nginx/access.log \ + --pid-path=/var/run/nginx.pid \ + --lock-path=/var/run/nginx.lock \ + --http-client-body-temp-path=/var/cache/nginx/client_temp \ + --http-proxy-temp-path=/var/cache/nginx/proxy_temp \ + --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \ + --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \ + --http-scgi-temp-path=/var/cache/nginx/scgi_temp \ + --with-perl_modules_path=/usr/lib/perl5/vendor_perl \ + --user=nginx \ + --group=nginx \ + --with-compat \ + --with-file-aio \ + --with-threads \ + --with-http_addition_module \ + --with-http_auth_request_module \ + --with-http_dav_module \ + --with-http_flv_module \ + --with-http_gunzip_module \ + --with-http_gzip_static_module \ + --with-http_mp4_module \ + --with-http_random_index_module \ + --with-http_realip_module \ + --with-http_secure_link_module \ + --with-http_slice_module \ + --with-http_ssl_module \ + --with-http_stub_status_module \ + --with-http_sub_module \ + --with-http_v2_module \ + --with-mail \ + --with-mail_ssl_module \ + --with-stream \ + --with-stream_realip_module \ + --with-stream_ssl_module \ + --with-stream_ssl_preread_module \ + --without-pcre2 \ + --add-module=/lua-nginx-module-${VER_LUA_NGINX_MODULE} \ + --add-module=/ngx_devel_kit-${VER_NGX_DEVEL_KIT} \ + --add-module=/lua-upstream-nginx-module-${VER_LUA_UPSTREAM} \ + --add-module=/headers-more-nginx-module-${VER_OPENRESTY_HEADERS} \ + --add-module=/stream-lua-nginx-module-${VER_OPENRESTY_STREAMLUA} \ +" +ENV NGINX_BUILD_CONFIG=$NGINX_BUILD_CONFIG + +ARG BUILD_DEPS_BASE="\ + GeoIP-devel \ + ca-certificates \ + findutils \ + gcc-c++ \ + gzip \ + lua-${VER_LUA} \ + lua-devel-${VER_LUA} \ + make \ + openssl-devel \ + patch \ + pcre-devel \ + tar \ + unzip \ + zlib-devel \ +" +ENV BUILD_DEPS_BASE=$BUILD_DEPS_BASE +ARG BUILD_DEPS_AMD64="\ + ${BUILD_DEPS_BASE} \ +" +ENV BUILD_DEPS_AMD64=$BUILD_DEPS_AMD64 +ARG BUILD_DEPS_ARM64V8="\ + ${BUILD_DEPS_BASE} \ +" +ENV BUILD_DEPS_ARM64V8=$BUILD_DEPS_ARM64V8 +ENV BUILD_DEPS= + +ARG NGINX_BUILD_DEPS="" +ENV NGINX_BUILD_DEPS=$NGINX_BUILD_DEPS + +#################################### +# Build Nginx with support for LUA # +#################################### +FROM base AS builder + +# hadolint ignore=SC2086 +RUN set -eux \ + && eval BUILD_DEPS="\$$(echo BUILD_DEPS_${ARCH} | tr '[:lower:]' '[:upper:]')" \ + && rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux \ + && dnf install -y 'dnf-command(config-manager)' epel-release \ + && dnf config-manager --set-enabled powertools \ + && dnf config-manager --set-enabled epel \ + && dnf makecache \ + && dnf install -y \ + $BUILD_DEPS \ + $NGINX_BUILD_DEPS + +COPY tpl/Makefile Makefile + +RUN make deps \ + && make core + +RUN set -eux \ +# envsubst +# ############################################################################## + && dnf makecache \ + && dnf install -y \ + gettext + +########################################## +# Combine everything with minimal layers # +########################################## +FROM base + +# http://label-schema.org/rc1/ +LABEL maintainer="Fabio Cicerchia " \ + org.label-schema.build-date="${BUILD_DATE}" \ + org.label-schema.description="Nginx ${VER_NGINX} with Lua support based on ${DOCKER_IMAGE_OS} ${DOCKER_IMAGE_TAG}." \ + org.label-schema.docker.cmd="docker run -p 80:80 -d ${DOCKER_IMAGE}:${VER_NGINX}-${DOCKER_IMAGE_OS}${DOCKER_IMAGE_TAG}" \ + org.label-schema.name="${DOCKER_IMAGE}" \ + org.label-schema.schema-version="1.0" \ + org.label-schema.url="https://github.com/${DOCKER_IMAGE}" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-url="https://github.com/${DOCKER_IMAGE}" \ + org.label-schema.version="${VER_NGINX}-${DOCKER_IMAGE_OS}${DOCKER_IMAGE_TAG}" \ + image.target.platform="${TARGETPLATFORM}" \ + image.target.os="${TARGETOS}" \ + image.target.arch="${ARCH}" \ + versions.headers-more-nginx-module="${VER_OPENRESTY_HEADERS}" \ + versions.lua="${VER_LUA}" \ + versions.luarocks="${VER_LUAROCKS}" \ + versions.lua-nginx-module="${VER_LUA_NGINX_MODULE}" \ + versions.lua-resty-cookie="${VER_CLOUDFLARE_COOKIE}" \ + versions.lua-resty-core="${VER_LUA_RESTY_CORE}" \ + versions.lua-resty-dns="${VER_OPENRESTY_DNS}" \ + versions.lua-resty-lrucache="${VER_LUA_RESTY_LRUCACHE}" \ + versions.lua-resty-memcached="${VER_OPENRESTY_MEMCACHED}" \ + versions.lua-resty-mysql="${VER_OPENRESTY_MYSQL}" \ + versions.lua-resty-redis="${VER_OPENRESTY_REDIS}" \ + versions.lua-resty-shell="${VER_OPENRESTY_SHELL}" \ + versions.lua-resty-signal="${VER_OPENRESTY_SIGNAL}" \ + versions.lua-resty-tablepool="${VER_OPENRESTY_TABLEPOOL}" \ + versions.lua-resty-upstream-healthcheck="${VER_OPENRESTY_HEALTHCHECK}" \ + versions.lua-resty-websocket="${VER_OPENRESTY_WEBSOCKET}" \ + versions.lua-upstream="${VER_LUA_UPSTREAM}" \ + versions.luajit2="${VER_LUAJIT}" \ + versions.nginx-lua-prometheus="${VER_PROMETHEUS}" \ + versions.nginx="${VER_NGINX}" \ + versions.ngx_devel_kit="${VER_NGX_DEVEL_KIT}" \ + versions.os="${DOCKER_IMAGE_TAG}" \ + versions.stream-lua-nginx-module="${VER_OPENRESTY_STREAMLUA}" + +ARG PKG_DEPS="\ + GeoIP-devel \ + ca-certificates \ + gcc-c++ \ + lua-${VER_LUA} \ + lua-devel-${VER_LUA} \ + luarocks \ + openssl-devel \ + pcre-devel \ + unzip \ + zlib-devel \ +" +ENV PKG_DEPS=$PKG_DEPS + +COPY --from=builder /etc/nginx /etc/nginx +COPY --from=builder /usr/local/lib /usr/local/lib +COPY --from=builder /usr/local/share/lua /usr/local/share/lua +COPY --from=builder /usr/sbin/nginx /usr/sbin/nginx +COPY --from=builder /usr/sbin/nginx-debug /usr/sbin/nginx-debug +COPY --from=builder /var/cache/nginx /var/cache/nginx +COPY --from=builder /usr/bin/envsubst /usr/local/bin/envsubst + +SHELL ["/bin/sh", "-o", "pipefail", "-c"] + +# hadolint ignore=SC2086 +RUN set -eux \ + && rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux \ + && dnf install -y 'dnf-command(config-manager)' epel-release \ + && dnf config-manager --set-enabled powertools \ + && dnf config-manager --set-enabled epel \ + && dnf makecache \ + && dnf install -y \ + $PKG_DEPS \ +# Fix LUA alias + && ln -sf /usr/bin/lua${VER_LUA} /usr/local/bin/lua \ +# Bring in tzdata so users could set the timezones through the environment +# variables + && dnf install -y tzdata \ +# Bring in curl and ca-certificates to make registering on DNS SD easier + && dnf install -y curl ca-certificates \ +# forward request and error logs to docker log collector + && mkdir -p /var/log/nginx \ + && ln -sf /dev/stdout /var/log/nginx/access.log \ + && ln -sf /dev/stderr /var/log/nginx/error.log \ +# create nginx user/group first, to be consistent throughout docker variants + && groupadd --system --gid 101 nginx \ + && useradd --system --gid nginx --no-create-home --home /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \ + && mkdir /docker-entrypoint.d \ +# Cleanup +# ############################################################################## + && dnf clean all \ + && rm -rf /var/cache/dnf + +COPY tpl/support.sh / +COPY tpl/docker-entrypoint.sh / +COPY tpl/10-listen-on-ipv6-by-default.sh /docker-entrypoint.d/ +COPY tpl/20-envsubst-on-templates.sh /docker-entrypoint.d/ +COPY tpl/nginx.conf /etc/nginx/nginx.conf +COPY tpl/default.conf /etc/nginx/conf.d/default.conf + +# smoke test +# ############################################################################## +RUN envsubst -V \ + && nginx -V \ + && nginx -t \ + && lua -v \ + && luarocks --version + +EXPOSE 80 443 + +HEALTHCHECK --interval=30s --timeout=3s CMD curl --fail http://localhost/ || exit 1 + +# Override stop signal to stop process gracefully +STOPSIGNAL SIGQUIT + +ENTRYPOINT ["/docker-entrypoint.sh"] + +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx/1.21.6/almalinux/8.5-20220306/Dockerfile-compat b/nginx/1.21.6/almalinux/8.5-20220306/Dockerfile-compat new file mode 100644 index 00000000..a8de3396 --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/Dockerfile-compat @@ -0,0 +1,409 @@ +# __ __ +# .-----.-----.|__|.-----.--.--.______| |.--.--.---.-. +# | | _ || || |_ _|______| || | | _ | +# |__|__|___ ||__||__|__|__.__| |__||_____|___._| +# |_____| +# +# Copyright (c) 2022 Fabio Cicerchia. https://fabiocicerchia.it. MIT License +# Repo: https://github.com/fabiocicerchia/nginx-lua + +ARG ARCH= +ARG DISTRO=almalinux +ARG DISTRO_VER=8.5-20220306 + +############################# +# Settings Common Variables # +############################# +FROM ${ARCH}/$DISTRO:$DISTRO_VER AS base + +ARG ARCH= +ENV ARCH=$ARCH + +ENV DOCKER_IMAGE=fabiocicerchia/nginx-lua +ENV DOCKER_IMAGE_OS=${DISTRO} +ENV DOCKER_IMAGE_TAG=${DISTRO_VER} + +ARG BUILD_DATE +ENV BUILD_DATE=$BUILD_DATE +ARG VCS_REF +ENV VCS_REF=$VCS_REF + +# lua +ARG VER_LUA=5.3.4 +ENV VER_LUA=$VER_LUA + +# ngx_devel_kit +# https://github.com/vision5/ngx_devel_kit/releases +# The NDK is now considered to be stable. +ARG VER_NGX_DEVEL_KIT=0.3.1 +ENV VER_NGX_DEVEL_KIT=$VER_NGX_DEVEL_KIT + +# luajit2 +# https://github.com/openresty/luajit2/releases +ARG VER_LUAJIT=2.1-20211210 +ENV VER_LUAJIT=$VER_LUAJIT +ARG LUAJIT_LIB=/usr/local/lib +ENV LUAJIT_LIB=$LUAJIT_LIB +ARG LUAJIT_INC=/usr/local/include/luajit-2.1 +ENV LUAJIT_INC=$LUAJIT_INC +ENV LUA_INCDIR=$LUAJIT_INC +ARG LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH +ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH + +# lua-nginx-module +# https://github.com/openresty/lua-nginx-module/tags +# Production ready. +ARG VER_LUA_NGINX_MODULE=0.10.20 +ENV VER_LUA_NGINX_MODULE=$VER_LUA_NGINX_MODULE + +# lua-resty-core +# https://github.com/openresty/lua-resty-core/tags +# This library is production ready. +ARG VER_LUA_RESTY_CORE=0.1.22 +ENV VER_LUA_RESTY_CORE=$VER_LUA_RESTY_CORE +ARG LUA_LIB_DIR=/usr/local/share/lua/5.1 +ENV LUA_LIB_DIR=$LUA_LIB_DIR + +# lua-resty-lrucache +# https://github.com/openresty/lua-resty-lrucache/tags +# This library is considered production ready. +ARG VER_LUA_RESTY_LRUCACHE=0.11 +ENV VER_LUA_RESTY_LRUCACHE=$VER_LUA_RESTY_LRUCACHE + +# headers-more-nginx-module +# https://github.com/openresty/headers-more-nginx-module/commits/master +ARG VER_OPENRESTY_HEADERS=a4a0686605161a6777d7d612d5aef79b9e7c13e0 +ENV VER_OPENRESTY_HEADERS=$VER_OPENRESTY_HEADERS + +# lua-resty-cookie +# https://github.com/cloudflare/lua-resty-cookie/commits/master +ARG VER_CLOUDFLARE_COOKIE=99be1005e38ce19ace54515272a2be1b9fdc5da2 +ENV VER_CLOUDFLARE_COOKIE=$VER_CLOUDFLARE_COOKIE + +# lua-resty-dns +# https://github.com/openresty/lua-resty-dns/tags +ARG VER_OPENRESTY_DNS=0.22 +ENV VER_OPENRESTY_DNS=$VER_OPENRESTY_DNS + +# lua-resty-memcached +# https://github.com/openresty/lua-resty-memcached/tags +ARG VER_OPENRESTY_MEMCACHED=0.16 +ENV VER_OPENRESTY_MEMCACHED=$VER_OPENRESTY_MEMCACHED + +# lua-resty-mysql +# https://github.com/openresty/lua-resty-mysql/tags +ARG VER_OPENRESTY_MYSQL=0.24 +ENV VER_OPENRESTY_MYSQL=$VER_OPENRESTY_MYSQL + +# lua-resty-redis +# https://github.com/openresty/lua-resty-redis/releases +ARG VER_OPENRESTY_REDIS=0.29 +ENV VER_OPENRESTY_REDIS=$VER_OPENRESTY_REDIS + +# lua-resty-shell +# https://github.com/openresty/lua-resty-shell/tags +ARG VER_OPENRESTY_SHELL=0.03 +ENV VER_OPENRESTY_SHELL=$VER_OPENRESTY_SHELL + +# lua-resty-signal +# https://github.com/openresty/lua-resty-signal/releases +ARG VER_OPENRESTY_SIGNAL=0.03 +ENV VER_OPENRESTY_SIGNAL=$VER_OPENRESTY_SIGNAL + +# lua-tablepool +# https://github.com/openresty/lua-tablepool/releases +ARG VER_OPENRESTY_TABLEPOOL=0.02 +ENV VER_OPENRESTY_TABLEPOOL=$VER_OPENRESTY_TABLEPOOL + +# lua-resty-upstream-healthcheck +# https://github.com/openresty/lua-resty-upstream-healthcheck/tags +ARG VER_OPENRESTY_HEALTHCHECK=0.06 +ENV VER_OPENRESTY_HEALTHCHECK=$VER_OPENRESTY_HEALTHCHECK + +# lua-resty-websocket +# https://github.com/openresty/lua-resty-websocket/tags +ARG VER_OPENRESTY_WEBSOCKET=0.08 +ENV VER_OPENRESTY_WEBSOCKET=$VER_OPENRESTY_WEBSOCKET + +# lua-rocks +# https://luarocks.github.io/luarocks/releases/ +ARG VER_LUAROCKS=3.8.0 +ENV VER_LUAROCKS=$VER_LUAROCKS + +# lua-upstream-nginx-module +# https://github.com/openresty/lua-upstream-nginx-module/tags +ARG VER_LUA_UPSTREAM=0.07 +ENV VER_LUA_UPSTREAM=$VER_LUA_UPSTREAM + +# nginx-lua-prometheus +# https://github.com/knyar/nginx-lua-prometheus/tags +ARG VER_PROMETHEUS=0.20210206 +ENV VER_PROMETHEUS=$VER_PROMETHEUS + +# stream-lua-nginx-module +# https://github.com/openresty/stream-lua-nginx-module/tags +ARG VER_OPENRESTY_STREAMLUA=0.0.10 +ENV VER_OPENRESTY_STREAMLUA=$VER_OPENRESTY_STREAMLUA + +# https://github.com/nginx/nginx/releases +ARG VER_NGINX=1.21.6 +ENV VER_NGINX=$VER_NGINX +# References: +# - https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc +# - https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html +# -g Generate debugging information +# -O2 Recommended optimizations +# -fstack-protector-strong Stack smashing protector +# -Wformat Check calls to make sure that the arguments supplied have types appropriate to the format string specified +# -Werror=format-security Reject potentially unsafe format string arguents +# -Wp,-D_FORTIFY_SOURCE=2 Run-time buffer overflow detection +# -fPIC No text relocations +ARG NGX_CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC" +ENV NGX_CFLAGS=$NGX_CFLAGS +# References +# - https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc +# - https://wiki.debian.org/ToolChain/DSOLinking#Unresolved_symbols_in_shared_libraries +# - https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html +# - https://linux.die.net/man/1/ld +# -Wl,-rpath,/usr/local/lib Add a directory to the runtime library search path +# -Wl,-z,relro Read-only segments after relocation +# -Wl,-z,now Disable lazy binding +# -Wl,--as-needed Only link with needed libraries +# -pie Full ASLR for executables +ARG NGX_LDOPT="-Wl,-rpath,/usr/local/lib -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie" +ENV NGX_LDOPT=$NGX_LDOPT +# Reference: http://nginx.org/en/docs/configure.html +# NOTE: Almalinux is building with PCRE instead of PCRE2 mostly due to +# https://github.com/openresty/lua-nginx-module/issues/1984. +# More details on it: https://github.com/fabiocicerchia/nginx-lua/pull/40 +ARG NGINX_BUILD_CONFIG="\ + --prefix=/etc/nginx \ + --sbin-path=/usr/sbin/nginx \ + --modules-path=/usr/lib/nginx/modules \ + --conf-path=/etc/nginx/nginx.conf \ + --error-log-path=/var/log/nginx/error.log \ + --http-log-path=/var/log/nginx/access.log \ + --pid-path=/var/run/nginx.pid \ + --lock-path=/var/run/nginx.lock \ + --http-client-body-temp-path=/var/cache/nginx/client_temp \ + --http-proxy-temp-path=/var/cache/nginx/proxy_temp \ + --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \ + --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \ + --http-scgi-temp-path=/var/cache/nginx/scgi_temp \ + --with-perl_modules_path=/usr/lib/perl5/vendor_perl \ + --user=nginx \ + --group=nginx \ + --with-compat \ + --with-file-aio \ + --with-threads \ + --with-http_addition_module \ + --with-http_auth_request_module \ + --with-http_dav_module \ + --with-http_flv_module \ + --with-http_gunzip_module \ + --with-http_gzip_static_module \ + --with-http_mp4_module \ + --with-http_random_index_module \ + --with-http_realip_module \ + --with-http_secure_link_module \ + --with-http_slice_module \ + --with-http_ssl_module \ + --with-http_stub_status_module \ + --with-http_sub_module \ + --with-http_v2_module \ + --with-mail \ + --with-mail_ssl_module \ + --with-stream \ + --with-stream_realip_module \ + --with-stream_ssl_module \ + --with-stream_ssl_preread_module \ + --without-pcre2 \ + --add-module=/lua-nginx-module-${VER_LUA_NGINX_MODULE} \ + --add-module=/ngx_devel_kit-${VER_NGX_DEVEL_KIT} \ + --add-module=/lua-upstream-nginx-module-${VER_LUA_UPSTREAM} \ + --add-module=/headers-more-nginx-module-${VER_OPENRESTY_HEADERS} \ + --add-module=/stream-lua-nginx-module-${VER_OPENRESTY_STREAMLUA} \ +" +ENV NGINX_BUILD_CONFIG=$NGINX_BUILD_CONFIG + +ARG BUILD_DEPS_BASE="\ + GeoIP-devel \ + ca-certificates \ + findutils \ + gcc-c++ \ + gzip \ + make \ + readline-devel \ + openssl-devel \ + patch \ + pcre-devel \ + tar \ + unzip \ + zlib-devel \ +" +ENV BUILD_DEPS_BASE=$BUILD_DEPS_BASE +ARG BUILD_DEPS_AMD64="\ + ${BUILD_DEPS_BASE} \ +" +ENV BUILD_DEPS_AMD64=$BUILD_DEPS_AMD64 +ARG BUILD_DEPS_ARM64V8="\ + ${BUILD_DEPS_BASE} \ +" +ENV BUILD_DEPS_ARM64V8=$BUILD_DEPS_ARM64V8 +ENV BUILD_DEPS= + +ARG NGINX_BUILD_DEPS="" +ENV NGINX_BUILD_DEPS=$NGINX_BUILD_DEPS + +#################################### +# Build Nginx with support for LUA # +#################################### +FROM base AS builder + +# hadolint ignore=SC2086 +RUN set -eux \ + && eval BUILD_DEPS="\$$(echo BUILD_DEPS_${ARCH} | tr '[:lower:]' '[:upper:]')" \ + && rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux \ + && dnf install -y 'dnf-command(config-manager)' epel-release \ + && dnf config-manager --set-enabled powertools \ + && dnf config-manager --set-enabled epel \ + && dnf makecache \ + && dnf install -y \ + $BUILD_DEPS \ + $NGINX_BUILD_DEPS + +COPY tpl/Makefile Makefile + +RUN make deps \ + && make lua-src \ + && make core \ + && make luarocks + +RUN set -eux \ +# envsubst +# ############################################################################## + && dnf makecache \ + && dnf install -y \ + gettext + +########################################## +# Combine everything with minimal layers # +########################################## +FROM base + +# http://label-schema.org/rc1/ +LABEL maintainer="Fabio Cicerchia " \ + org.label-schema.build-date="${BUILD_DATE}" \ + org.label-schema.description="Nginx ${VER_NGINX} with Lua support based on ${DOCKER_IMAGE_OS} ${DOCKER_IMAGE_TAG}." \ + org.label-schema.docker.cmd="docker run -p 80:80 -d ${DOCKER_IMAGE}:${VER_NGINX}-${DOCKER_IMAGE_OS}${DOCKER_IMAGE_TAG}" \ + org.label-schema.name="${DOCKER_IMAGE}" \ + org.label-schema.schema-version="1.0" \ + org.label-schema.url="https://github.com/${DOCKER_IMAGE}" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-url="https://github.com/${DOCKER_IMAGE}" \ + org.label-schema.version="${VER_NGINX}-${DOCKER_IMAGE_OS}${DOCKER_IMAGE_TAG}" \ + image.target.platform="${TARGETPLATFORM}" \ + image.target.os="${TARGETOS}" \ + image.target.arch="${ARCH}" \ + versions.headers-more-nginx-module="${VER_OPENRESTY_HEADERS}" \ + versions.lua="${VER_LUA}" \ + versions.luarocks="${VER_LUAROCKS}" \ + versions.lua-nginx-module="${VER_LUA_NGINX_MODULE}" \ + versions.lua-resty-cookie="${VER_CLOUDFLARE_COOKIE}" \ + versions.lua-resty-core="${VER_LUA_RESTY_CORE}" \ + versions.lua-resty-dns="${VER_OPENRESTY_DNS}" \ + versions.lua-resty-lrucache="${VER_LUA_RESTY_LRUCACHE}" \ + versions.lua-resty-memcached="${VER_OPENRESTY_MEMCACHED}" \ + versions.lua-resty-mysql="${VER_OPENRESTY_MYSQL}" \ + versions.lua-resty-redis="${VER_OPENRESTY_REDIS}" \ + versions.lua-resty-shell="${VER_OPENRESTY_SHELL}" \ + versions.lua-resty-signal="${VER_OPENRESTY_SIGNAL}" \ + versions.lua-resty-tablepool="${VER_OPENRESTY_TABLEPOOL}" \ + versions.lua-resty-upstream-healthcheck="${VER_OPENRESTY_HEALTHCHECK}" \ + versions.lua-resty-websocket="${VER_OPENRESTY_WEBSOCKET}" \ + versions.lua-upstream="${VER_LUA_UPSTREAM}" \ + versions.luajit2="${VER_LUAJIT}" \ + versions.nginx-lua-prometheus="${VER_PROMETHEUS}" \ + versions.nginx="${VER_NGINX}" \ + versions.ngx_devel_kit="${VER_NGX_DEVEL_KIT}" \ + versions.os="${DOCKER_IMAGE_TAG}" \ + versions.stream-lua-nginx-module="${VER_OPENRESTY_STREAMLUA}" + +ARG PKG_DEPS="\ + GeoIP-devel \ + ca-certificates \ + gcc-c++ \ + openssl-devel \ + pcre-devel \ + unzip \ + zlib-devel \ +" +ENV PKG_DEPS=$PKG_DEPS + +COPY --from=builder /etc/nginx /etc/nginx +COPY --from=builder /usr/local/lib /usr/local/lib +COPY --from=builder /usr/local/share/lua /usr/local/share/lua +COPY --from=builder /usr/sbin/nginx /usr/sbin/nginx +COPY --from=builder /usr/sbin/nginx-debug /usr/sbin/nginx-debug +COPY --from=builder /var/cache/nginx /var/cache/nginx +COPY --from=builder /usr/bin/envsubst /usr/local/bin/envsubst +COPY --from=builder /usr/local/bin/lua /usr/local/bin/lua +COPY --from=builder /usr/local/bin/luajit /usr/local/bin/luajit +COPY --from=builder /usr/local/bin/luarocks /usr/local/bin/luarocks +COPY --from=builder /usr/local/etc/luarocks /usr/local/etc/luarocks +COPY --from=builder $LUAJIT_INC $LUAJIT_INC + +SHELL ["/bin/sh", "-o", "pipefail", "-c"] + +# hadolint ignore=SC2086 +RUN set -eux \ + && rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux \ + && dnf install -y 'dnf-command(config-manager)' epel-release \ + && dnf config-manager --set-enabled powertools \ + && dnf config-manager --set-enabled epel \ + && dnf makecache \ + && dnf install -y \ + $PKG_DEPS \ +# Bring in tzdata so users could set the timezones through the environment +# variables + && dnf install -y tzdata \ +# Bring in curl and ca-certificates to make registering on DNS SD easier + && dnf install -y curl ca-certificates \ +# forward request and error logs to docker log collector + && mkdir -p /var/log/nginx \ + && ln -sf /dev/stdout /var/log/nginx/access.log \ + && ln -sf /dev/stderr /var/log/nginx/error.log \ +# create nginx user/group first, to be consistent throughout docker variants + && groupadd --system --gid 101 nginx \ + && useradd --system --gid nginx --no-create-home --home /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \ + && mkdir /docker-entrypoint.d \ +# Cleanup +# ############################################################################## + && dnf clean all \ + && rm -rf /var/cache/dnf + +COPY tpl/support.sh / +COPY tpl/docker-entrypoint.sh / +COPY tpl/10-listen-on-ipv6-by-default.sh /docker-entrypoint.d/ +COPY tpl/20-envsubst-on-templates.sh /docker-entrypoint.d/ +COPY tpl/nginx.conf /etc/nginx/nginx.conf +COPY tpl/default.conf /etc/nginx/conf.d/default.conf + +# smoke test +# ############################################################################## +RUN envsubst -V \ + && nginx -V \ + && nginx -t \ + && lua -v \ + && luarocks --version + +EXPOSE 80 443 + +HEALTHCHECK --interval=30s --timeout=3s CMD curl --fail http://localhost/ || exit 1 + +# Override stop signal to stop process gracefully +STOPSIGNAL SIGQUIT + +ENTRYPOINT ["/docker-entrypoint.sh"] + +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx/1.21.6/almalinux/8.5-20220306/Makefile b/nginx/1.21.6/almalinux/8.5-20220306/Makefile new file mode 100644 index 00000000..a5640431 --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/Makefile @@ -0,0 +1,233 @@ +# __ __ +# .-----.-----.|__|.-----.--.--.______| |.--.--.---.-. +# | | _ || || |_ _|______| || | | _ | +# |__|__|___ ||__||__|__|__.__| |__||_____|___._| +# |_____| +# +# Copyright (c) 2022 Fabio Cicerchia. https://fabiocicerchia.it. MIT License +# Repo: https://github.com/fabiocicerchia/nginx-lua + +EXTENDED_IMAGE=YES +NPROC := $(shell nproc) + +# ############################################################################## +# CORE +# ############################################################################## + +core: +# NGINX +# ############################################################################## +# we're on an architecture upstream doesn't officially build for +# let's build binaries from the published packaging sources +# TODO: need to get all patches from openresty? +# TODO: Find a better way to fallback when openresty is behind the nginx latest version and no patch is available + curl -sLo /nginx.tar.gz https://nginx.org/download/nginx-${VER_NGINX}.tar.gz + tar -C / -xvzf /nginx.tar.gz + mkdir -p /var/cache/nginx/client_temp \ + /var/cache/nginx/proxy_temp \ + /var/cache/nginx/fastcgi_temp \ + /var/cache/nginx/uwsgi_temp \ + /var/cache/nginx/scgi_temp + cd /nginx-${VER_NGINX} \ + && (curl --fail -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-${VER_NGINX}-socket_cloexec.patch || \ + curl -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.21.4-socket_cloexec.patch) \ + && patch -p1 < nginx-socket_cloexec.patch || exit 1 \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" --with-debug \ + && make -j $(NPROC) build \ + && mv objs/nginx objs/nginx-debug \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" \ + && make -j $(NPROC) build \ + && make -j $(NPROC) modules \ + && install -m755 objs/nginx-debug /usr/sbin/nginx-debug \ + && make -j $(NPROC) install + +# ############################################################################## +# DEPENDENCIES +# ############################################################################## + +deps: dep-ngx_devel_kit dep-luajit dep-lua-nginx dep-lua-resty-core dep-lua-resty-lrucache +ifeq ($(EXTENDED_IMAGE), YES) + make dep-headers-more-nginx-module dep-lua-resty-cookie dep-lua-openresty-dns dep-lua-openresty-memcached dep-lua-openresty-mysql dep-lua-openresty-redis dep-lua-openresty-shell dep-lua-openresty-tablepool dep-lua-openresty-signal dep-lua-resty-upstream-healthcheck dep-lua-openresty-websocket dep-lua-upstream-nginx-module dep-nginx-lua-prometheus dep-stream-lua-nginx-module +endif + +# NGX Devel Kit +# ############################################################################## +dep-ngx_devel_kit: + curl -sLo /ngx_devel_kit.tar.gz https://github.com/vision5/ngx_devel_kit/archive/v${VER_NGX_DEVEL_KIT}.tar.gz + tar -C / -xvzf /ngx_devel_kit.tar.gz + +# OpenResty LUAJIT2 +# ############################################################################## +dep-luajit: + curl -sLo /luajit.tar.gz https://github.com/openresty/luajit2/archive/v${VER_LUAJIT}.tar.gz + tar -C / -xvzf /luajit.tar.gz + cd /luajit2-${VER_LUAJIT} \ + && make \ + && make install + +# Lua Nginx Module +# ############################################################################## +dep-lua-nginx: + curl -sLo /lua-nginx.tar.gz https://github.com/openresty/lua-nginx-module/archive/v${VER_LUA_NGINX_MODULE}.tar.gz + tar -C / -xvzf /lua-nginx.tar.gz + +# LUA Resty Core +# ############################################################################## +dep-lua-resty-core: + curl -sLo /lua-resty-core.tar.gz https://github.com/openresty/lua-resty-core/archive/v${VER_LUA_RESTY_CORE}.tar.gz + tar -C / -xvzf /lua-resty-core.tar.gz + cd /lua-resty-core-${VER_LUA_RESTY_CORE} \ + && make \ + && make install + +# LUA Resty LRUCache +# ############################################################################## +dep-lua-resty-lrucache: + curl -sLo /lua-resty-lrucache.tar.gz https://github.com/openresty/lua-resty-lrucache/archive/v${VER_LUA_RESTY_LRUCACHE}.tar.gz + tar -C / -xvzf /lua-resty-lrucache.tar.gz + cd /lua-resty-lrucache-${VER_LUA_RESTY_LRUCACHE} \ + && make \ + && make install + +# OpenResty Headers +# ############################################################################## +dep-headers-more-nginx-module: + curl -sLo /headers-more-nginx-module.zip https://github.com/openresty/headers-more-nginx-module/archive/${VER_OPENRESTY_HEADERS}.zip + unzip -d / /headers-more-nginx-module.zip + +# Cloudflare Cookie +# ############################################################################## +dep-lua-resty-cookie: + curl -sLo /lua-resty-cookie.tar.gz https://github.com/cloudflare/lua-resty-cookie/archive/${VER_CLOUDFLARE_COOKIE}.tar.gz + tar -C / -xvzf /lua-resty-cookie.tar.gz + cd /lua-resty-cookie-${VER_CLOUDFLARE_COOKIE} \ + && make \ + && make install + +# OpenResty Dns +# ############################################################################## +dep-lua-openresty-dns: + curl -sLo /lua-openresty-dns.tar.gz https://github.com/openresty/lua-resty-dns/archive/v${VER_OPENRESTY_DNS}.tar.gz + tar -C / -xvzf /lua-openresty-dns.tar.gz + cd /lua-resty-dns-${VER_OPENRESTY_DNS} \ + && make \ + && make install + +# OpenResty Memcached +# ############################################################################## +dep-lua-openresty-memcached: + curl -sLo /lua-openresty-memcached.tar.gz https://github.com/openresty/lua-resty-memcached/archive/v${VER_OPENRESTY_MEMCACHED}.tar.gz + tar -C / -xvzf /lua-openresty-memcached.tar.gz + cd /lua-resty-memcached-${VER_OPENRESTY_MEMCACHED} \ + && make \ + && make install + +# OpenResty Mysql +# ############################################################################## +dep-lua-openresty-mysql: + curl -sLo /lua-openresty-mysql.tar.gz https://github.com/openresty/lua-resty-mysql/archive/v${VER_OPENRESTY_MYSQL}.tar.gz + tar -C / -xvzf /lua-openresty-mysql.tar.gz + cd /lua-resty-mysql-${VER_OPENRESTY_MYSQL} \ + && make \ + && make install + +# OpenResty Redis +# ############################################################################## +dep-lua-openresty-redis: + curl -sLo /lua-openresty-redis.tar.gz https://github.com/openresty/lua-resty-redis/archive/v${VER_OPENRESTY_REDIS}.tar.gz + tar -C / -xvzf /lua-openresty-redis.tar.gz + cd /lua-resty-redis-${VER_OPENRESTY_REDIS} \ + && make \ + && make install + +# OpenResty Shell +# ############################################################################## +dep-lua-openresty-shell: + curl -sLo /lua-openresty-shell.tar.gz https://github.com/openresty/lua-resty-shell/archive/v${VER_OPENRESTY_SHELL}.tar.gz + tar -C / -xvzf /lua-openresty-shell.tar.gz + cd /lua-resty-shell-${VER_OPENRESTY_SHELL} \ + && make \ + && make install + +# OpenResty Tablepool +# ############################################################################## +dep-lua-openresty-tablepool: + curl -sLo /lua-tablepool.tar.gz https://github.com/openresty/lua-tablepool/archive/refs/tags/v${VER_OPENRESTY_TABLEPOOL}.tar.gz + tar -C / -xvzf /lua-tablepool.tar.gz + cd /lua-tablepool-${VER_OPENRESTY_TABLEPOOL} \ + && make \ + && make install + +# OpenResty Signal +# ############################################################################## +dep-lua-openresty-signal: + curl -sLo /lua-openresty-signal.tar.gz https://github.com/openresty/lua-resty-signal/archive/refs/tags/v${VER_OPENRESTY_SIGNAL}.tar.gz + tar -C / -xvzf /lua-openresty-signal.tar.gz + cd /lua-resty-signal-${VER_OPENRESTY_SIGNAL} \ + && make \ + && make install \ + && install -d /usr/local/lib/lua/5.1 \ + && install /usr/local/share/lua/5.1/librestysignal.so /usr/local/lib/lua/5.1/librestysignal.so + +# OpenResty Upstream Healthcheck +# ############################################################################## +dep-lua-resty-upstream-healthcheck: + curl -sLo /lua-resty-upstream-healthcheck.tar.gz https://github.com/openresty/lua-resty-upstream-healthcheck/archive/v${VER_OPENRESTY_HEALTHCHECK}.tar.gz + tar -C / -xvzf /lua-resty-upstream-healthcheck.tar.gz + cd /lua-resty-upstream-healthcheck-${VER_OPENRESTY_HEALTHCHECK} \ + && make \ + && make install + +# OpenResty Websocket +# ############################################################################## +dep-lua-openresty-websocket: + curl -sLo /lua-openresty-websocket.tar.gz https://github.com/openresty/lua-resty-websocket/archive/v${VER_OPENRESTY_WEBSOCKET}.tar.gz + tar -C / -xvzf /lua-openresty-websocket.tar.gz + cd /lua-resty-websocket-${VER_OPENRESTY_WEBSOCKET} \ + && make \ + && make install + +# LUA Upstream +# ############################################################################## +dep-lua-upstream-nginx-module: + curl -sLo /lua-upstream-nginx-module.tar.gz https://github.com/openresty/lua-upstream-nginx-module/archive/v${VER_LUA_UPSTREAM}.tar.gz + tar -C / -xvzf /lua-upstream-nginx-module.tar.gz + +# Prometheus +# ############################################################################## +dep-nginx-lua-prometheus: + curl -sLo /nginx-lua-prometheus.tar.gz https://github.com/knyar/nginx-lua-prometheus/archive/${VER_PROMETHEUS}.tar.gz + tar -C / -xvzf /nginx-lua-prometheus.tar.gz + mv /nginx-lua-prometheus-${VER_PROMETHEUS}/*.lua ${LUA_LIB_DIR}/ + +# OpenResty Stream Lua +# ############################################################################## +dep-stream-lua-nginx-module: + curl -sLo /stream-lua-nginx-module.zip https://github.com/openresty/stream-lua-nginx-module/archive/v${VER_OPENRESTY_STREAMLUA}.zip + unzip -d / /stream-lua-nginx-module.zip + +# ############################################################################## +# LUAROCKS +# ############################################################################## + +luarocks: + curl -sLo /luarocks.tar.gz https://luarocks.org/releases/luarocks-${VER_LUAROCKS}.tar.gz + tar -C / -xzvf /luarocks.tar.gz + cd /luarocks-${VER_LUAROCKS}; \ + ./configure \ + && make \ + && make install + +################################################################################ +##@ COMPILE LUA +################################################################################ + +lua-src: + curl -sLo /luasrc.tar.gz http://www.lua.org/ftp/lua-${VER_LUA}.tar.gz + tar -C / -xzvf /luasrc.tar.gz + cd /lua-$${VER_LUA}; \ + sed -i "s/DLUA_COMPAT_5_3/DLUA_COMPAT_5_1/" src/Makefile \ + && sed -i "s/DLUA_COMPAT_5_2/DLUA_COMPAT_5_1/" src/Makefile \ + && make linux test \ + && make install \ + && cp /lua-$${VER_LUA}/src/*.h /usr/include/ diff --git a/nginx/1.21.6/almalinux/8.5-20220306/default.conf b/nginx/1.21.6/almalinux/8.5-20220306/default.conf new file mode 100644 index 00000000..4559b82f --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/default.conf @@ -0,0 +1,44 @@ +server { + listen 80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/nginx/1.21.6/almalinux/8.5-20220306/docker-entrypoint.sh b/nginx/1.21.6/almalinux/8.5-20220306/docker-entrypoint.sh new file mode 100644 index 00000000..501839b7 --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/docker-entrypoint.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +/support.sh + +set -e + +if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then + exec 3>&1 +else + exec 3>/dev/null +fi + +if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then + if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then + echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" + + echo >&3 "$0: Looking for shell scripts in /docker-entrypoint.d/" + find "/docker-entrypoint.d/" -follow -type f -print | sort -n | while read -r f; do + case "$f" in + *.sh) + if [ -x "$f" ]; then + echo >&3 "$0: Launching $f"; + "$f" + else + # warn on shell scripts without exec bit + echo >&3 "$0: Ignoring $f, not executable"; + fi + ;; + *) echo >&3 "$0: Ignoring $f";; + esac + done + + echo >&3 "$0: Configuration complete; ready for start up" + else + echo >&3 "$0: No files found in /docker-entrypoint.d/, skipping configuration" + fi +fi + +exec "$@" diff --git a/nginx/1.21.6/almalinux/8.5-20220306/nginx.conf b/nginx/1.21.6/almalinux/8.5-20220306/nginx.conf new file mode 100644 index 00000000..41d94b46 --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/nginx.conf @@ -0,0 +1,31 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/nginx/1.21.6/almalinux/8.5-20220306/support.sh b/nginx/1.21.6/almalinux/8.5-20220306/support.sh new file mode 100644 index 00000000..e981196e --- /dev/null +++ b/nginx/1.21.6/almalinux/8.5-20220306/support.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "💗 Support the Project 💗" +echo "This project is only maintained by one person, Fabio Cicerchia ." +echo "It started as a simple docker image, now it updates automatically periodically and provides support for multiple disto 😎" +echo "Maintaining a project is a very time consuming activity, especially when done alone 💪" +echo "I really want to make this project better and become super cool 🚀" +echo "" +echo "If you'd like to support this open-source project I'll appreciate any kind of contribution ." +echo "" +echo "---" +echo "" + +# track execution runs +if [ "$SKIP_TRACK" != "1" ]; then + curl -m 5 "https://kodebeat.com/nginx-lua/stats/hit/boot.php?os=$DOCKER_IMAGE_OS&v=$VER_NGINX" +fi diff --git a/nginx/1.21.6/alpine/3.15.0/10-listen-on-ipv6-by-default.sh b/nginx/1.21.6/alpine/3.15.0/10-listen-on-ipv6-by-default.sh new file mode 100644 index 00000000..cd5190db --- /dev/null +++ b/nginx/1.21.6/alpine/3.15.0/10-listen-on-ipv6-by-default.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +set -e + +ME=$(basename $0) +DEFAULT_CONF_FILE="etc/nginx/conf.d/default.conf" + +# check if we have ipv6 available +if [ ! -f "/proc/net/if_inet6" ]; then + echo >&3 "$ME: error: ipv6 not available" + exit 0 +fi + +if [ ! -f "/$DEFAULT_CONF_FILE" ]; then + echo >&3 "$ME: error: /$DEFAULT_CONF_FILE is not a file or does not exist" + exit 0 +fi + +# check if the file can be modified, e.g. not on a r/o filesystem +touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: error: can not modify /$DEFAULT_CONF_FILE (read-only file system?)"; exit 0; } + +# check if the file is already modified, e.g. on a container restart +grep -q "listen \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: error: IPv6 listen already enabled"; exit 0; } + +if [ -f "/etc/os-release" ]; then + . /etc/os-release +else + echo >&3 "$ME: error: can not guess the operating system" + exit 0 +fi + +echo >&3 "$ME: Getting the checksum of /$DEFAULT_CONF_FILE" + +#case "$ID" in +# "debian") +# CHECKSUM=$(dpkg-query --show --showformat='${Conffiles}\n' nginx | grep $DEFAULT_CONF_FILE | cut -d' ' -f 3) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | md5sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packaged version" +# exit 0 +# } +# ;; +# "alpine") +# CHECKSUM=$(apk manifest nginx 2>/dev/null| grep $DEFAULT_CONF_FILE | cut -d' ' -f 1 | cut -d ':' -f 2) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | sha1sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packages version" +# exit 0 +# } +# ;; +# *) +# echo >&3 "$ME: error: Unsupported distribution" +# exit 0 +# ;; +#esac + +# enable ipv6 on default.conf listen sockets +sed -i -E 's,listen 80;,listen 80;\n listen [::]:80;,' /$DEFAULT_CONF_FILE + +echo >&3 "$ME: Enabled listen on IPv6 in /$DEFAULT_CONF_FILE" + +exit 0 diff --git a/nginx/1.21.6/alpine/3.15.0/20-envsubst-on-templates.sh b/nginx/1.21.6/alpine/3.15.0/20-envsubst-on-templates.sh new file mode 100644 index 00000000..4f330295 --- /dev/null +++ b/nginx/1.21.6/alpine/3.15.0/20-envsubst-on-templates.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +ME=$(basename $0) + +auto_envsubst() { + local template_dir="${NGINX_ENVSUBST_TEMPLATE_DIR:-/etc/nginx/templates}" + local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}" + local output_dir="${NGINX_ENVSUBST_OUTPUT_DIR:-/etc/nginx/conf.d}" + + local template defined_envs relative_path output_path subdir + defined_envs=$(printf '${%s} ' $(env | cut -d= -f1)) + [ -d "$template_dir" ] || return 0 + if [ ! -w "$output_dir" ]; then + echo >&3 "$ME: ERROR: $template_dir exists, but $output_dir is not writable" + return 0 + fi + find "$template_dir" -follow -type f -name "*$suffix" -print | while read -r template; do + relative_path="${template#$template_dir/}" + output_path="$output_dir/${relative_path%$suffix}" + subdir=$(dirname "$relative_path") + # create a subdirectory where the template file exists + mkdir -p "$output_dir/$subdir" + echo >&3 "$ME: Running envsubst on $template to $output_path" + envsubst "$defined_envs" < "$template" > "$output_path" + done +} + +auto_envsubst + +exit 0 diff --git a/nginx/1.21.6/alpine/3.15.0/Makefile b/nginx/1.21.6/alpine/3.15.0/Makefile new file mode 100644 index 00000000..a5640431 --- /dev/null +++ b/nginx/1.21.6/alpine/3.15.0/Makefile @@ -0,0 +1,233 @@ +# __ __ +# .-----.-----.|__|.-----.--.--.______| |.--.--.---.-. +# | | _ || || |_ _|______| || | | _ | +# |__|__|___ ||__||__|__|__.__| |__||_____|___._| +# |_____| +# +# Copyright (c) 2022 Fabio Cicerchia. https://fabiocicerchia.it. MIT License +# Repo: https://github.com/fabiocicerchia/nginx-lua + +EXTENDED_IMAGE=YES +NPROC := $(shell nproc) + +# ############################################################################## +# CORE +# ############################################################################## + +core: +# NGINX +# ############################################################################## +# we're on an architecture upstream doesn't officially build for +# let's build binaries from the published packaging sources +# TODO: need to get all patches from openresty? +# TODO: Find a better way to fallback when openresty is behind the nginx latest version and no patch is available + curl -sLo /nginx.tar.gz https://nginx.org/download/nginx-${VER_NGINX}.tar.gz + tar -C / -xvzf /nginx.tar.gz + mkdir -p /var/cache/nginx/client_temp \ + /var/cache/nginx/proxy_temp \ + /var/cache/nginx/fastcgi_temp \ + /var/cache/nginx/uwsgi_temp \ + /var/cache/nginx/scgi_temp + cd /nginx-${VER_NGINX} \ + && (curl --fail -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-${VER_NGINX}-socket_cloexec.patch || \ + curl -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.21.4-socket_cloexec.patch) \ + && patch -p1 < nginx-socket_cloexec.patch || exit 1 \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" --with-debug \ + && make -j $(NPROC) build \ + && mv objs/nginx objs/nginx-debug \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" \ + && make -j $(NPROC) build \ + && make -j $(NPROC) modules \ + && install -m755 objs/nginx-debug /usr/sbin/nginx-debug \ + && make -j $(NPROC) install + +# ############################################################################## +# DEPENDENCIES +# ############################################################################## + +deps: dep-ngx_devel_kit dep-luajit dep-lua-nginx dep-lua-resty-core dep-lua-resty-lrucache +ifeq ($(EXTENDED_IMAGE), YES) + make dep-headers-more-nginx-module dep-lua-resty-cookie dep-lua-openresty-dns dep-lua-openresty-memcached dep-lua-openresty-mysql dep-lua-openresty-redis dep-lua-openresty-shell dep-lua-openresty-tablepool dep-lua-openresty-signal dep-lua-resty-upstream-healthcheck dep-lua-openresty-websocket dep-lua-upstream-nginx-module dep-nginx-lua-prometheus dep-stream-lua-nginx-module +endif + +# NGX Devel Kit +# ############################################################################## +dep-ngx_devel_kit: + curl -sLo /ngx_devel_kit.tar.gz https://github.com/vision5/ngx_devel_kit/archive/v${VER_NGX_DEVEL_KIT}.tar.gz + tar -C / -xvzf /ngx_devel_kit.tar.gz + +# OpenResty LUAJIT2 +# ############################################################################## +dep-luajit: + curl -sLo /luajit.tar.gz https://github.com/openresty/luajit2/archive/v${VER_LUAJIT}.tar.gz + tar -C / -xvzf /luajit.tar.gz + cd /luajit2-${VER_LUAJIT} \ + && make \ + && make install + +# Lua Nginx Module +# ############################################################################## +dep-lua-nginx: + curl -sLo /lua-nginx.tar.gz https://github.com/openresty/lua-nginx-module/archive/v${VER_LUA_NGINX_MODULE}.tar.gz + tar -C / -xvzf /lua-nginx.tar.gz + +# LUA Resty Core +# ############################################################################## +dep-lua-resty-core: + curl -sLo /lua-resty-core.tar.gz https://github.com/openresty/lua-resty-core/archive/v${VER_LUA_RESTY_CORE}.tar.gz + tar -C / -xvzf /lua-resty-core.tar.gz + cd /lua-resty-core-${VER_LUA_RESTY_CORE} \ + && make \ + && make install + +# LUA Resty LRUCache +# ############################################################################## +dep-lua-resty-lrucache: + curl -sLo /lua-resty-lrucache.tar.gz https://github.com/openresty/lua-resty-lrucache/archive/v${VER_LUA_RESTY_LRUCACHE}.tar.gz + tar -C / -xvzf /lua-resty-lrucache.tar.gz + cd /lua-resty-lrucache-${VER_LUA_RESTY_LRUCACHE} \ + && make \ + && make install + +# OpenResty Headers +# ############################################################################## +dep-headers-more-nginx-module: + curl -sLo /headers-more-nginx-module.zip https://github.com/openresty/headers-more-nginx-module/archive/${VER_OPENRESTY_HEADERS}.zip + unzip -d / /headers-more-nginx-module.zip + +# Cloudflare Cookie +# ############################################################################## +dep-lua-resty-cookie: + curl -sLo /lua-resty-cookie.tar.gz https://github.com/cloudflare/lua-resty-cookie/archive/${VER_CLOUDFLARE_COOKIE}.tar.gz + tar -C / -xvzf /lua-resty-cookie.tar.gz + cd /lua-resty-cookie-${VER_CLOUDFLARE_COOKIE} \ + && make \ + && make install + +# OpenResty Dns +# ############################################################################## +dep-lua-openresty-dns: + curl -sLo /lua-openresty-dns.tar.gz https://github.com/openresty/lua-resty-dns/archive/v${VER_OPENRESTY_DNS}.tar.gz + tar -C / -xvzf /lua-openresty-dns.tar.gz + cd /lua-resty-dns-${VER_OPENRESTY_DNS} \ + && make \ + && make install + +# OpenResty Memcached +# ############################################################################## +dep-lua-openresty-memcached: + curl -sLo /lua-openresty-memcached.tar.gz https://github.com/openresty/lua-resty-memcached/archive/v${VER_OPENRESTY_MEMCACHED}.tar.gz + tar -C / -xvzf /lua-openresty-memcached.tar.gz + cd /lua-resty-memcached-${VER_OPENRESTY_MEMCACHED} \ + && make \ + && make install + +# OpenResty Mysql +# ############################################################################## +dep-lua-openresty-mysql: + curl -sLo /lua-openresty-mysql.tar.gz https://github.com/openresty/lua-resty-mysql/archive/v${VER_OPENRESTY_MYSQL}.tar.gz + tar -C / -xvzf /lua-openresty-mysql.tar.gz + cd /lua-resty-mysql-${VER_OPENRESTY_MYSQL} \ + && make \ + && make install + +# OpenResty Redis +# ############################################################################## +dep-lua-openresty-redis: + curl -sLo /lua-openresty-redis.tar.gz https://github.com/openresty/lua-resty-redis/archive/v${VER_OPENRESTY_REDIS}.tar.gz + tar -C / -xvzf /lua-openresty-redis.tar.gz + cd /lua-resty-redis-${VER_OPENRESTY_REDIS} \ + && make \ + && make install + +# OpenResty Shell +# ############################################################################## +dep-lua-openresty-shell: + curl -sLo /lua-openresty-shell.tar.gz https://github.com/openresty/lua-resty-shell/archive/v${VER_OPENRESTY_SHELL}.tar.gz + tar -C / -xvzf /lua-openresty-shell.tar.gz + cd /lua-resty-shell-${VER_OPENRESTY_SHELL} \ + && make \ + && make install + +# OpenResty Tablepool +# ############################################################################## +dep-lua-openresty-tablepool: + curl -sLo /lua-tablepool.tar.gz https://github.com/openresty/lua-tablepool/archive/refs/tags/v${VER_OPENRESTY_TABLEPOOL}.tar.gz + tar -C / -xvzf /lua-tablepool.tar.gz + cd /lua-tablepool-${VER_OPENRESTY_TABLEPOOL} \ + && make \ + && make install + +# OpenResty Signal +# ############################################################################## +dep-lua-openresty-signal: + curl -sLo /lua-openresty-signal.tar.gz https://github.com/openresty/lua-resty-signal/archive/refs/tags/v${VER_OPENRESTY_SIGNAL}.tar.gz + tar -C / -xvzf /lua-openresty-signal.tar.gz + cd /lua-resty-signal-${VER_OPENRESTY_SIGNAL} \ + && make \ + && make install \ + && install -d /usr/local/lib/lua/5.1 \ + && install /usr/local/share/lua/5.1/librestysignal.so /usr/local/lib/lua/5.1/librestysignal.so + +# OpenResty Upstream Healthcheck +# ############################################################################## +dep-lua-resty-upstream-healthcheck: + curl -sLo /lua-resty-upstream-healthcheck.tar.gz https://github.com/openresty/lua-resty-upstream-healthcheck/archive/v${VER_OPENRESTY_HEALTHCHECK}.tar.gz + tar -C / -xvzf /lua-resty-upstream-healthcheck.tar.gz + cd /lua-resty-upstream-healthcheck-${VER_OPENRESTY_HEALTHCHECK} \ + && make \ + && make install + +# OpenResty Websocket +# ############################################################################## +dep-lua-openresty-websocket: + curl -sLo /lua-openresty-websocket.tar.gz https://github.com/openresty/lua-resty-websocket/archive/v${VER_OPENRESTY_WEBSOCKET}.tar.gz + tar -C / -xvzf /lua-openresty-websocket.tar.gz + cd /lua-resty-websocket-${VER_OPENRESTY_WEBSOCKET} \ + && make \ + && make install + +# LUA Upstream +# ############################################################################## +dep-lua-upstream-nginx-module: + curl -sLo /lua-upstream-nginx-module.tar.gz https://github.com/openresty/lua-upstream-nginx-module/archive/v${VER_LUA_UPSTREAM}.tar.gz + tar -C / -xvzf /lua-upstream-nginx-module.tar.gz + +# Prometheus +# ############################################################################## +dep-nginx-lua-prometheus: + curl -sLo /nginx-lua-prometheus.tar.gz https://github.com/knyar/nginx-lua-prometheus/archive/${VER_PROMETHEUS}.tar.gz + tar -C / -xvzf /nginx-lua-prometheus.tar.gz + mv /nginx-lua-prometheus-${VER_PROMETHEUS}/*.lua ${LUA_LIB_DIR}/ + +# OpenResty Stream Lua +# ############################################################################## +dep-stream-lua-nginx-module: + curl -sLo /stream-lua-nginx-module.zip https://github.com/openresty/stream-lua-nginx-module/archive/v${VER_OPENRESTY_STREAMLUA}.zip + unzip -d / /stream-lua-nginx-module.zip + +# ############################################################################## +# LUAROCKS +# ############################################################################## + +luarocks: + curl -sLo /luarocks.tar.gz https://luarocks.org/releases/luarocks-${VER_LUAROCKS}.tar.gz + tar -C / -xzvf /luarocks.tar.gz + cd /luarocks-${VER_LUAROCKS}; \ + ./configure \ + && make \ + && make install + +################################################################################ +##@ COMPILE LUA +################################################################################ + +lua-src: + curl -sLo /luasrc.tar.gz http://www.lua.org/ftp/lua-${VER_LUA}.tar.gz + tar -C / -xzvf /luasrc.tar.gz + cd /lua-$${VER_LUA}; \ + sed -i "s/DLUA_COMPAT_5_3/DLUA_COMPAT_5_1/" src/Makefile \ + && sed -i "s/DLUA_COMPAT_5_2/DLUA_COMPAT_5_1/" src/Makefile \ + && make linux test \ + && make install \ + && cp /lua-$${VER_LUA}/src/*.h /usr/include/ diff --git a/nginx/1.21.6/alpine/3.15.0/default.conf b/nginx/1.21.6/alpine/3.15.0/default.conf new file mode 100644 index 00000000..4559b82f --- /dev/null +++ b/nginx/1.21.6/alpine/3.15.0/default.conf @@ -0,0 +1,44 @@ +server { + listen 80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/nginx/1.21.6/alpine/3.15.0/docker-entrypoint.sh b/nginx/1.21.6/alpine/3.15.0/docker-entrypoint.sh new file mode 100644 index 00000000..501839b7 --- /dev/null +++ b/nginx/1.21.6/alpine/3.15.0/docker-entrypoint.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +/support.sh + +set -e + +if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then + exec 3>&1 +else + exec 3>/dev/null +fi + +if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then + if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then + echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" + + echo >&3 "$0: Looking for shell scripts in /docker-entrypoint.d/" + find "/docker-entrypoint.d/" -follow -type f -print | sort -n | while read -r f; do + case "$f" in + *.sh) + if [ -x "$f" ]; then + echo >&3 "$0: Launching $f"; + "$f" + else + # warn on shell scripts without exec bit + echo >&3 "$0: Ignoring $f, not executable"; + fi + ;; + *) echo >&3 "$0: Ignoring $f";; + esac + done + + echo >&3 "$0: Configuration complete; ready for start up" + else + echo >&3 "$0: No files found in /docker-entrypoint.d/, skipping configuration" + fi +fi + +exec "$@" diff --git a/nginx/1.21.6/alpine/3.15.0/nginx.conf b/nginx/1.21.6/alpine/3.15.0/nginx.conf new file mode 100644 index 00000000..41d94b46 --- /dev/null +++ b/nginx/1.21.6/alpine/3.15.0/nginx.conf @@ -0,0 +1,31 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/nginx/1.21.6/alpine/3.15.0/support.sh b/nginx/1.21.6/alpine/3.15.0/support.sh new file mode 100644 index 00000000..e981196e --- /dev/null +++ b/nginx/1.21.6/alpine/3.15.0/support.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "💗 Support the Project 💗" +echo "This project is only maintained by one person, Fabio Cicerchia ." +echo "It started as a simple docker image, now it updates automatically periodically and provides support for multiple disto 😎" +echo "Maintaining a project is a very time consuming activity, especially when done alone 💪" +echo "I really want to make this project better and become super cool 🚀" +echo "" +echo "If you'd like to support this open-source project I'll appreciate any kind of contribution ." +echo "" +echo "---" +echo "" + +# track execution runs +if [ "$SKIP_TRACK" != "1" ]; then + curl -m 5 "https://kodebeat.com/nginx-lua/stats/hit/boot.php?os=$DOCKER_IMAGE_OS&v=$VER_NGINX" +fi diff --git a/nginx/1.21.6/amazonlinux/2.0.20220218.1/10-listen-on-ipv6-by-default.sh b/nginx/1.21.6/amazonlinux/2.0.20220218.1/10-listen-on-ipv6-by-default.sh new file mode 100644 index 00000000..cd5190db --- /dev/null +++ b/nginx/1.21.6/amazonlinux/2.0.20220218.1/10-listen-on-ipv6-by-default.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +set -e + +ME=$(basename $0) +DEFAULT_CONF_FILE="etc/nginx/conf.d/default.conf" + +# check if we have ipv6 available +if [ ! -f "/proc/net/if_inet6" ]; then + echo >&3 "$ME: error: ipv6 not available" + exit 0 +fi + +if [ ! -f "/$DEFAULT_CONF_FILE" ]; then + echo >&3 "$ME: error: /$DEFAULT_CONF_FILE is not a file or does not exist" + exit 0 +fi + +# check if the file can be modified, e.g. not on a r/o filesystem +touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: error: can not modify /$DEFAULT_CONF_FILE (read-only file system?)"; exit 0; } + +# check if the file is already modified, e.g. on a container restart +grep -q "listen \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: error: IPv6 listen already enabled"; exit 0; } + +if [ -f "/etc/os-release" ]; then + . /etc/os-release +else + echo >&3 "$ME: error: can not guess the operating system" + exit 0 +fi + +echo >&3 "$ME: Getting the checksum of /$DEFAULT_CONF_FILE" + +#case "$ID" in +# "debian") +# CHECKSUM=$(dpkg-query --show --showformat='${Conffiles}\n' nginx | grep $DEFAULT_CONF_FILE | cut -d' ' -f 3) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | md5sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packaged version" +# exit 0 +# } +# ;; +# "alpine") +# CHECKSUM=$(apk manifest nginx 2>/dev/null| grep $DEFAULT_CONF_FILE | cut -d' ' -f 1 | cut -d ':' -f 2) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | sha1sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packages version" +# exit 0 +# } +# ;; +# *) +# echo >&3 "$ME: error: Unsupported distribution" +# exit 0 +# ;; +#esac + +# enable ipv6 on default.conf listen sockets +sed -i -E 's,listen 80;,listen 80;\n listen [::]:80;,' /$DEFAULT_CONF_FILE + +echo >&3 "$ME: Enabled listen on IPv6 in /$DEFAULT_CONF_FILE" + +exit 0 diff --git a/nginx/1.21.6/amazonlinux/2.0.20220218.1/20-envsubst-on-templates.sh b/nginx/1.21.6/amazonlinux/2.0.20220218.1/20-envsubst-on-templates.sh new file mode 100644 index 00000000..4f330295 --- /dev/null +++ b/nginx/1.21.6/amazonlinux/2.0.20220218.1/20-envsubst-on-templates.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +ME=$(basename $0) + +auto_envsubst() { + local template_dir="${NGINX_ENVSUBST_TEMPLATE_DIR:-/etc/nginx/templates}" + local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}" + local output_dir="${NGINX_ENVSUBST_OUTPUT_DIR:-/etc/nginx/conf.d}" + + local template defined_envs relative_path output_path subdir + defined_envs=$(printf '${%s} ' $(env | cut -d= -f1)) + [ -d "$template_dir" ] || return 0 + if [ ! -w "$output_dir" ]; then + echo >&3 "$ME: ERROR: $template_dir exists, but $output_dir is not writable" + return 0 + fi + find "$template_dir" -follow -type f -name "*$suffix" -print | while read -r template; do + relative_path="${template#$template_dir/}" + output_path="$output_dir/${relative_path%$suffix}" + subdir=$(dirname "$relative_path") + # create a subdirectory where the template file exists + mkdir -p "$output_dir/$subdir" + echo >&3 "$ME: Running envsubst on $template to $output_path" + envsubst "$defined_envs" < "$template" > "$output_path" + done +} + +auto_envsubst + +exit 0 diff --git a/nginx/1.21.6/amazonlinux/2.0.20220218.1/Makefile b/nginx/1.21.6/amazonlinux/2.0.20220218.1/Makefile new file mode 100644 index 00000000..a5640431 --- /dev/null +++ b/nginx/1.21.6/amazonlinux/2.0.20220218.1/Makefile @@ -0,0 +1,233 @@ +# __ __ +# .-----.-----.|__|.-----.--.--.______| |.--.--.---.-. +# | | _ || || |_ _|______| || | | _ | +# |__|__|___ ||__||__|__|__.__| |__||_____|___._| +# |_____| +# +# Copyright (c) 2022 Fabio Cicerchia. https://fabiocicerchia.it. MIT License +# Repo: https://github.com/fabiocicerchia/nginx-lua + +EXTENDED_IMAGE=YES +NPROC := $(shell nproc) + +# ############################################################################## +# CORE +# ############################################################################## + +core: +# NGINX +# ############################################################################## +# we're on an architecture upstream doesn't officially build for +# let's build binaries from the published packaging sources +# TODO: need to get all patches from openresty? +# TODO: Find a better way to fallback when openresty is behind the nginx latest version and no patch is available + curl -sLo /nginx.tar.gz https://nginx.org/download/nginx-${VER_NGINX}.tar.gz + tar -C / -xvzf /nginx.tar.gz + mkdir -p /var/cache/nginx/client_temp \ + /var/cache/nginx/proxy_temp \ + /var/cache/nginx/fastcgi_temp \ + /var/cache/nginx/uwsgi_temp \ + /var/cache/nginx/scgi_temp + cd /nginx-${VER_NGINX} \ + && (curl --fail -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-${VER_NGINX}-socket_cloexec.patch || \ + curl -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.21.4-socket_cloexec.patch) \ + && patch -p1 < nginx-socket_cloexec.patch || exit 1 \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" --with-debug \ + && make -j $(NPROC) build \ + && mv objs/nginx objs/nginx-debug \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" \ + && make -j $(NPROC) build \ + && make -j $(NPROC) modules \ + && install -m755 objs/nginx-debug /usr/sbin/nginx-debug \ + && make -j $(NPROC) install + +# ############################################################################## +# DEPENDENCIES +# ############################################################################## + +deps: dep-ngx_devel_kit dep-luajit dep-lua-nginx dep-lua-resty-core dep-lua-resty-lrucache +ifeq ($(EXTENDED_IMAGE), YES) + make dep-headers-more-nginx-module dep-lua-resty-cookie dep-lua-openresty-dns dep-lua-openresty-memcached dep-lua-openresty-mysql dep-lua-openresty-redis dep-lua-openresty-shell dep-lua-openresty-tablepool dep-lua-openresty-signal dep-lua-resty-upstream-healthcheck dep-lua-openresty-websocket dep-lua-upstream-nginx-module dep-nginx-lua-prometheus dep-stream-lua-nginx-module +endif + +# NGX Devel Kit +# ############################################################################## +dep-ngx_devel_kit: + curl -sLo /ngx_devel_kit.tar.gz https://github.com/vision5/ngx_devel_kit/archive/v${VER_NGX_DEVEL_KIT}.tar.gz + tar -C / -xvzf /ngx_devel_kit.tar.gz + +# OpenResty LUAJIT2 +# ############################################################################## +dep-luajit: + curl -sLo /luajit.tar.gz https://github.com/openresty/luajit2/archive/v${VER_LUAJIT}.tar.gz + tar -C / -xvzf /luajit.tar.gz + cd /luajit2-${VER_LUAJIT} \ + && make \ + && make install + +# Lua Nginx Module +# ############################################################################## +dep-lua-nginx: + curl -sLo /lua-nginx.tar.gz https://github.com/openresty/lua-nginx-module/archive/v${VER_LUA_NGINX_MODULE}.tar.gz + tar -C / -xvzf /lua-nginx.tar.gz + +# LUA Resty Core +# ############################################################################## +dep-lua-resty-core: + curl -sLo /lua-resty-core.tar.gz https://github.com/openresty/lua-resty-core/archive/v${VER_LUA_RESTY_CORE}.tar.gz + tar -C / -xvzf /lua-resty-core.tar.gz + cd /lua-resty-core-${VER_LUA_RESTY_CORE} \ + && make \ + && make install + +# LUA Resty LRUCache +# ############################################################################## +dep-lua-resty-lrucache: + curl -sLo /lua-resty-lrucache.tar.gz https://github.com/openresty/lua-resty-lrucache/archive/v${VER_LUA_RESTY_LRUCACHE}.tar.gz + tar -C / -xvzf /lua-resty-lrucache.tar.gz + cd /lua-resty-lrucache-${VER_LUA_RESTY_LRUCACHE} \ + && make \ + && make install + +# OpenResty Headers +# ############################################################################## +dep-headers-more-nginx-module: + curl -sLo /headers-more-nginx-module.zip https://github.com/openresty/headers-more-nginx-module/archive/${VER_OPENRESTY_HEADERS}.zip + unzip -d / /headers-more-nginx-module.zip + +# Cloudflare Cookie +# ############################################################################## +dep-lua-resty-cookie: + curl -sLo /lua-resty-cookie.tar.gz https://github.com/cloudflare/lua-resty-cookie/archive/${VER_CLOUDFLARE_COOKIE}.tar.gz + tar -C / -xvzf /lua-resty-cookie.tar.gz + cd /lua-resty-cookie-${VER_CLOUDFLARE_COOKIE} \ + && make \ + && make install + +# OpenResty Dns +# ############################################################################## +dep-lua-openresty-dns: + curl -sLo /lua-openresty-dns.tar.gz https://github.com/openresty/lua-resty-dns/archive/v${VER_OPENRESTY_DNS}.tar.gz + tar -C / -xvzf /lua-openresty-dns.tar.gz + cd /lua-resty-dns-${VER_OPENRESTY_DNS} \ + && make \ + && make install + +# OpenResty Memcached +# ############################################################################## +dep-lua-openresty-memcached: + curl -sLo /lua-openresty-memcached.tar.gz https://github.com/openresty/lua-resty-memcached/archive/v${VER_OPENRESTY_MEMCACHED}.tar.gz + tar -C / -xvzf /lua-openresty-memcached.tar.gz + cd /lua-resty-memcached-${VER_OPENRESTY_MEMCACHED} \ + && make \ + && make install + +# OpenResty Mysql +# ############################################################################## +dep-lua-openresty-mysql: + curl -sLo /lua-openresty-mysql.tar.gz https://github.com/openresty/lua-resty-mysql/archive/v${VER_OPENRESTY_MYSQL}.tar.gz + tar -C / -xvzf /lua-openresty-mysql.tar.gz + cd /lua-resty-mysql-${VER_OPENRESTY_MYSQL} \ + && make \ + && make install + +# OpenResty Redis +# ############################################################################## +dep-lua-openresty-redis: + curl -sLo /lua-openresty-redis.tar.gz https://github.com/openresty/lua-resty-redis/archive/v${VER_OPENRESTY_REDIS}.tar.gz + tar -C / -xvzf /lua-openresty-redis.tar.gz + cd /lua-resty-redis-${VER_OPENRESTY_REDIS} \ + && make \ + && make install + +# OpenResty Shell +# ############################################################################## +dep-lua-openresty-shell: + curl -sLo /lua-openresty-shell.tar.gz https://github.com/openresty/lua-resty-shell/archive/v${VER_OPENRESTY_SHELL}.tar.gz + tar -C / -xvzf /lua-openresty-shell.tar.gz + cd /lua-resty-shell-${VER_OPENRESTY_SHELL} \ + && make \ + && make install + +# OpenResty Tablepool +# ############################################################################## +dep-lua-openresty-tablepool: + curl -sLo /lua-tablepool.tar.gz https://github.com/openresty/lua-tablepool/archive/refs/tags/v${VER_OPENRESTY_TABLEPOOL}.tar.gz + tar -C / -xvzf /lua-tablepool.tar.gz + cd /lua-tablepool-${VER_OPENRESTY_TABLEPOOL} \ + && make \ + && make install + +# OpenResty Signal +# ############################################################################## +dep-lua-openresty-signal: + curl -sLo /lua-openresty-signal.tar.gz https://github.com/openresty/lua-resty-signal/archive/refs/tags/v${VER_OPENRESTY_SIGNAL}.tar.gz + tar -C / -xvzf /lua-openresty-signal.tar.gz + cd /lua-resty-signal-${VER_OPENRESTY_SIGNAL} \ + && make \ + && make install \ + && install -d /usr/local/lib/lua/5.1 \ + && install /usr/local/share/lua/5.1/librestysignal.so /usr/local/lib/lua/5.1/librestysignal.so + +# OpenResty Upstream Healthcheck +# ############################################################################## +dep-lua-resty-upstream-healthcheck: + curl -sLo /lua-resty-upstream-healthcheck.tar.gz https://github.com/openresty/lua-resty-upstream-healthcheck/archive/v${VER_OPENRESTY_HEALTHCHECK}.tar.gz + tar -C / -xvzf /lua-resty-upstream-healthcheck.tar.gz + cd /lua-resty-upstream-healthcheck-${VER_OPENRESTY_HEALTHCHECK} \ + && make \ + && make install + +# OpenResty Websocket +# ############################################################################## +dep-lua-openresty-websocket: + curl -sLo /lua-openresty-websocket.tar.gz https://github.com/openresty/lua-resty-websocket/archive/v${VER_OPENRESTY_WEBSOCKET}.tar.gz + tar -C / -xvzf /lua-openresty-websocket.tar.gz + cd /lua-resty-websocket-${VER_OPENRESTY_WEBSOCKET} \ + && make \ + && make install + +# LUA Upstream +# ############################################################################## +dep-lua-upstream-nginx-module: + curl -sLo /lua-upstream-nginx-module.tar.gz https://github.com/openresty/lua-upstream-nginx-module/archive/v${VER_LUA_UPSTREAM}.tar.gz + tar -C / -xvzf /lua-upstream-nginx-module.tar.gz + +# Prometheus +# ############################################################################## +dep-nginx-lua-prometheus: + curl -sLo /nginx-lua-prometheus.tar.gz https://github.com/knyar/nginx-lua-prometheus/archive/${VER_PROMETHEUS}.tar.gz + tar -C / -xvzf /nginx-lua-prometheus.tar.gz + mv /nginx-lua-prometheus-${VER_PROMETHEUS}/*.lua ${LUA_LIB_DIR}/ + +# OpenResty Stream Lua +# ############################################################################## +dep-stream-lua-nginx-module: + curl -sLo /stream-lua-nginx-module.zip https://github.com/openresty/stream-lua-nginx-module/archive/v${VER_OPENRESTY_STREAMLUA}.zip + unzip -d / /stream-lua-nginx-module.zip + +# ############################################################################## +# LUAROCKS +# ############################################################################## + +luarocks: + curl -sLo /luarocks.tar.gz https://luarocks.org/releases/luarocks-${VER_LUAROCKS}.tar.gz + tar -C / -xzvf /luarocks.tar.gz + cd /luarocks-${VER_LUAROCKS}; \ + ./configure \ + && make \ + && make install + +################################################################################ +##@ COMPILE LUA +################################################################################ + +lua-src: + curl -sLo /luasrc.tar.gz http://www.lua.org/ftp/lua-${VER_LUA}.tar.gz + tar -C / -xzvf /luasrc.tar.gz + cd /lua-$${VER_LUA}; \ + sed -i "s/DLUA_COMPAT_5_3/DLUA_COMPAT_5_1/" src/Makefile \ + && sed -i "s/DLUA_COMPAT_5_2/DLUA_COMPAT_5_1/" src/Makefile \ + && make linux test \ + && make install \ + && cp /lua-$${VER_LUA}/src/*.h /usr/include/ diff --git a/nginx/1.21.6/amazonlinux/2.0.20220218.1/default.conf b/nginx/1.21.6/amazonlinux/2.0.20220218.1/default.conf new file mode 100644 index 00000000..4559b82f --- /dev/null +++ b/nginx/1.21.6/amazonlinux/2.0.20220218.1/default.conf @@ -0,0 +1,44 @@ +server { + listen 80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/nginx/1.21.6/amazonlinux/2.0.20220218.1/docker-entrypoint.sh b/nginx/1.21.6/amazonlinux/2.0.20220218.1/docker-entrypoint.sh new file mode 100644 index 00000000..501839b7 --- /dev/null +++ b/nginx/1.21.6/amazonlinux/2.0.20220218.1/docker-entrypoint.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +/support.sh + +set -e + +if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then + exec 3>&1 +else + exec 3>/dev/null +fi + +if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then + if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then + echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" + + echo >&3 "$0: Looking for shell scripts in /docker-entrypoint.d/" + find "/docker-entrypoint.d/" -follow -type f -print | sort -n | while read -r f; do + case "$f" in + *.sh) + if [ -x "$f" ]; then + echo >&3 "$0: Launching $f"; + "$f" + else + # warn on shell scripts without exec bit + echo >&3 "$0: Ignoring $f, not executable"; + fi + ;; + *) echo >&3 "$0: Ignoring $f";; + esac + done + + echo >&3 "$0: Configuration complete; ready for start up" + else + echo >&3 "$0: No files found in /docker-entrypoint.d/, skipping configuration" + fi +fi + +exec "$@" diff --git a/nginx/1.21.6/amazonlinux/2.0.20220218.1/nginx.conf b/nginx/1.21.6/amazonlinux/2.0.20220218.1/nginx.conf new file mode 100644 index 00000000..41d94b46 --- /dev/null +++ b/nginx/1.21.6/amazonlinux/2.0.20220218.1/nginx.conf @@ -0,0 +1,31 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/nginx/1.21.6/amazonlinux/2.0.20220218.1/support.sh b/nginx/1.21.6/amazonlinux/2.0.20220218.1/support.sh new file mode 100644 index 00000000..e981196e --- /dev/null +++ b/nginx/1.21.6/amazonlinux/2.0.20220218.1/support.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "💗 Support the Project 💗" +echo "This project is only maintained by one person, Fabio Cicerchia ." +echo "It started as a simple docker image, now it updates automatically periodically and provides support for multiple disto 😎" +echo "Maintaining a project is a very time consuming activity, especially when done alone 💪" +echo "I really want to make this project better and become super cool 🚀" +echo "" +echo "If you'd like to support this open-source project I'll appreciate any kind of contribution ." +echo "" +echo "---" +echo "" + +# track execution runs +if [ "$SKIP_TRACK" != "1" ]; then + curl -m 5 "https://kodebeat.com/nginx-lua/stats/hit/boot.php?os=$DOCKER_IMAGE_OS&v=$VER_NGINX" +fi diff --git a/nginx/1.21.6/debian/11.2/10-listen-on-ipv6-by-default.sh b/nginx/1.21.6/debian/11.2/10-listen-on-ipv6-by-default.sh new file mode 100644 index 00000000..cd5190db --- /dev/null +++ b/nginx/1.21.6/debian/11.2/10-listen-on-ipv6-by-default.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +set -e + +ME=$(basename $0) +DEFAULT_CONF_FILE="etc/nginx/conf.d/default.conf" + +# check if we have ipv6 available +if [ ! -f "/proc/net/if_inet6" ]; then + echo >&3 "$ME: error: ipv6 not available" + exit 0 +fi + +if [ ! -f "/$DEFAULT_CONF_FILE" ]; then + echo >&3 "$ME: error: /$DEFAULT_CONF_FILE is not a file or does not exist" + exit 0 +fi + +# check if the file can be modified, e.g. not on a r/o filesystem +touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: error: can not modify /$DEFAULT_CONF_FILE (read-only file system?)"; exit 0; } + +# check if the file is already modified, e.g. on a container restart +grep -q "listen \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: error: IPv6 listen already enabled"; exit 0; } + +if [ -f "/etc/os-release" ]; then + . /etc/os-release +else + echo >&3 "$ME: error: can not guess the operating system" + exit 0 +fi + +echo >&3 "$ME: Getting the checksum of /$DEFAULT_CONF_FILE" + +#case "$ID" in +# "debian") +# CHECKSUM=$(dpkg-query --show --showformat='${Conffiles}\n' nginx | grep $DEFAULT_CONF_FILE | cut -d' ' -f 3) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | md5sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packaged version" +# exit 0 +# } +# ;; +# "alpine") +# CHECKSUM=$(apk manifest nginx 2>/dev/null| grep $DEFAULT_CONF_FILE | cut -d' ' -f 1 | cut -d ':' -f 2) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | sha1sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packages version" +# exit 0 +# } +# ;; +# *) +# echo >&3 "$ME: error: Unsupported distribution" +# exit 0 +# ;; +#esac + +# enable ipv6 on default.conf listen sockets +sed -i -E 's,listen 80;,listen 80;\n listen [::]:80;,' /$DEFAULT_CONF_FILE + +echo >&3 "$ME: Enabled listen on IPv6 in /$DEFAULT_CONF_FILE" + +exit 0 diff --git a/nginx/1.21.6/debian/11.2/20-envsubst-on-templates.sh b/nginx/1.21.6/debian/11.2/20-envsubst-on-templates.sh new file mode 100644 index 00000000..4f330295 --- /dev/null +++ b/nginx/1.21.6/debian/11.2/20-envsubst-on-templates.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +ME=$(basename $0) + +auto_envsubst() { + local template_dir="${NGINX_ENVSUBST_TEMPLATE_DIR:-/etc/nginx/templates}" + local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}" + local output_dir="${NGINX_ENVSUBST_OUTPUT_DIR:-/etc/nginx/conf.d}" + + local template defined_envs relative_path output_path subdir + defined_envs=$(printf '${%s} ' $(env | cut -d= -f1)) + [ -d "$template_dir" ] || return 0 + if [ ! -w "$output_dir" ]; then + echo >&3 "$ME: ERROR: $template_dir exists, but $output_dir is not writable" + return 0 + fi + find "$template_dir" -follow -type f -name "*$suffix" -print | while read -r template; do + relative_path="${template#$template_dir/}" + output_path="$output_dir/${relative_path%$suffix}" + subdir=$(dirname "$relative_path") + # create a subdirectory where the template file exists + mkdir -p "$output_dir/$subdir" + echo >&3 "$ME: Running envsubst on $template to $output_path" + envsubst "$defined_envs" < "$template" > "$output_path" + done +} + +auto_envsubst + +exit 0 diff --git a/nginx/1.21.6/debian/11.2/Makefile b/nginx/1.21.6/debian/11.2/Makefile new file mode 100644 index 00000000..a5640431 --- /dev/null +++ b/nginx/1.21.6/debian/11.2/Makefile @@ -0,0 +1,233 @@ +# __ __ +# .-----.-----.|__|.-----.--.--.______| |.--.--.---.-. +# | | _ || || |_ _|______| || | | _ | +# |__|__|___ ||__||__|__|__.__| |__||_____|___._| +# |_____| +# +# Copyright (c) 2022 Fabio Cicerchia. https://fabiocicerchia.it. MIT License +# Repo: https://github.com/fabiocicerchia/nginx-lua + +EXTENDED_IMAGE=YES +NPROC := $(shell nproc) + +# ############################################################################## +# CORE +# ############################################################################## + +core: +# NGINX +# ############################################################################## +# we're on an architecture upstream doesn't officially build for +# let's build binaries from the published packaging sources +# TODO: need to get all patches from openresty? +# TODO: Find a better way to fallback when openresty is behind the nginx latest version and no patch is available + curl -sLo /nginx.tar.gz https://nginx.org/download/nginx-${VER_NGINX}.tar.gz + tar -C / -xvzf /nginx.tar.gz + mkdir -p /var/cache/nginx/client_temp \ + /var/cache/nginx/proxy_temp \ + /var/cache/nginx/fastcgi_temp \ + /var/cache/nginx/uwsgi_temp \ + /var/cache/nginx/scgi_temp + cd /nginx-${VER_NGINX} \ + && (curl --fail -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-${VER_NGINX}-socket_cloexec.patch || \ + curl -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.21.4-socket_cloexec.patch) \ + && patch -p1 < nginx-socket_cloexec.patch || exit 1 \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" --with-debug \ + && make -j $(NPROC) build \ + && mv objs/nginx objs/nginx-debug \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" \ + && make -j $(NPROC) build \ + && make -j $(NPROC) modules \ + && install -m755 objs/nginx-debug /usr/sbin/nginx-debug \ + && make -j $(NPROC) install + +# ############################################################################## +# DEPENDENCIES +# ############################################################################## + +deps: dep-ngx_devel_kit dep-luajit dep-lua-nginx dep-lua-resty-core dep-lua-resty-lrucache +ifeq ($(EXTENDED_IMAGE), YES) + make dep-headers-more-nginx-module dep-lua-resty-cookie dep-lua-openresty-dns dep-lua-openresty-memcached dep-lua-openresty-mysql dep-lua-openresty-redis dep-lua-openresty-shell dep-lua-openresty-tablepool dep-lua-openresty-signal dep-lua-resty-upstream-healthcheck dep-lua-openresty-websocket dep-lua-upstream-nginx-module dep-nginx-lua-prometheus dep-stream-lua-nginx-module +endif + +# NGX Devel Kit +# ############################################################################## +dep-ngx_devel_kit: + curl -sLo /ngx_devel_kit.tar.gz https://github.com/vision5/ngx_devel_kit/archive/v${VER_NGX_DEVEL_KIT}.tar.gz + tar -C / -xvzf /ngx_devel_kit.tar.gz + +# OpenResty LUAJIT2 +# ############################################################################## +dep-luajit: + curl -sLo /luajit.tar.gz https://github.com/openresty/luajit2/archive/v${VER_LUAJIT}.tar.gz + tar -C / -xvzf /luajit.tar.gz + cd /luajit2-${VER_LUAJIT} \ + && make \ + && make install + +# Lua Nginx Module +# ############################################################################## +dep-lua-nginx: + curl -sLo /lua-nginx.tar.gz https://github.com/openresty/lua-nginx-module/archive/v${VER_LUA_NGINX_MODULE}.tar.gz + tar -C / -xvzf /lua-nginx.tar.gz + +# LUA Resty Core +# ############################################################################## +dep-lua-resty-core: + curl -sLo /lua-resty-core.tar.gz https://github.com/openresty/lua-resty-core/archive/v${VER_LUA_RESTY_CORE}.tar.gz + tar -C / -xvzf /lua-resty-core.tar.gz + cd /lua-resty-core-${VER_LUA_RESTY_CORE} \ + && make \ + && make install + +# LUA Resty LRUCache +# ############################################################################## +dep-lua-resty-lrucache: + curl -sLo /lua-resty-lrucache.tar.gz https://github.com/openresty/lua-resty-lrucache/archive/v${VER_LUA_RESTY_LRUCACHE}.tar.gz + tar -C / -xvzf /lua-resty-lrucache.tar.gz + cd /lua-resty-lrucache-${VER_LUA_RESTY_LRUCACHE} \ + && make \ + && make install + +# OpenResty Headers +# ############################################################################## +dep-headers-more-nginx-module: + curl -sLo /headers-more-nginx-module.zip https://github.com/openresty/headers-more-nginx-module/archive/${VER_OPENRESTY_HEADERS}.zip + unzip -d / /headers-more-nginx-module.zip + +# Cloudflare Cookie +# ############################################################################## +dep-lua-resty-cookie: + curl -sLo /lua-resty-cookie.tar.gz https://github.com/cloudflare/lua-resty-cookie/archive/${VER_CLOUDFLARE_COOKIE}.tar.gz + tar -C / -xvzf /lua-resty-cookie.tar.gz + cd /lua-resty-cookie-${VER_CLOUDFLARE_COOKIE} \ + && make \ + && make install + +# OpenResty Dns +# ############################################################################## +dep-lua-openresty-dns: + curl -sLo /lua-openresty-dns.tar.gz https://github.com/openresty/lua-resty-dns/archive/v${VER_OPENRESTY_DNS}.tar.gz + tar -C / -xvzf /lua-openresty-dns.tar.gz + cd /lua-resty-dns-${VER_OPENRESTY_DNS} \ + && make \ + && make install + +# OpenResty Memcached +# ############################################################################## +dep-lua-openresty-memcached: + curl -sLo /lua-openresty-memcached.tar.gz https://github.com/openresty/lua-resty-memcached/archive/v${VER_OPENRESTY_MEMCACHED}.tar.gz + tar -C / -xvzf /lua-openresty-memcached.tar.gz + cd /lua-resty-memcached-${VER_OPENRESTY_MEMCACHED} \ + && make \ + && make install + +# OpenResty Mysql +# ############################################################################## +dep-lua-openresty-mysql: + curl -sLo /lua-openresty-mysql.tar.gz https://github.com/openresty/lua-resty-mysql/archive/v${VER_OPENRESTY_MYSQL}.tar.gz + tar -C / -xvzf /lua-openresty-mysql.tar.gz + cd /lua-resty-mysql-${VER_OPENRESTY_MYSQL} \ + && make \ + && make install + +# OpenResty Redis +# ############################################################################## +dep-lua-openresty-redis: + curl -sLo /lua-openresty-redis.tar.gz https://github.com/openresty/lua-resty-redis/archive/v${VER_OPENRESTY_REDIS}.tar.gz + tar -C / -xvzf /lua-openresty-redis.tar.gz + cd /lua-resty-redis-${VER_OPENRESTY_REDIS} \ + && make \ + && make install + +# OpenResty Shell +# ############################################################################## +dep-lua-openresty-shell: + curl -sLo /lua-openresty-shell.tar.gz https://github.com/openresty/lua-resty-shell/archive/v${VER_OPENRESTY_SHELL}.tar.gz + tar -C / -xvzf /lua-openresty-shell.tar.gz + cd /lua-resty-shell-${VER_OPENRESTY_SHELL} \ + && make \ + && make install + +# OpenResty Tablepool +# ############################################################################## +dep-lua-openresty-tablepool: + curl -sLo /lua-tablepool.tar.gz https://github.com/openresty/lua-tablepool/archive/refs/tags/v${VER_OPENRESTY_TABLEPOOL}.tar.gz + tar -C / -xvzf /lua-tablepool.tar.gz + cd /lua-tablepool-${VER_OPENRESTY_TABLEPOOL} \ + && make \ + && make install + +# OpenResty Signal +# ############################################################################## +dep-lua-openresty-signal: + curl -sLo /lua-openresty-signal.tar.gz https://github.com/openresty/lua-resty-signal/archive/refs/tags/v${VER_OPENRESTY_SIGNAL}.tar.gz + tar -C / -xvzf /lua-openresty-signal.tar.gz + cd /lua-resty-signal-${VER_OPENRESTY_SIGNAL} \ + && make \ + && make install \ + && install -d /usr/local/lib/lua/5.1 \ + && install /usr/local/share/lua/5.1/librestysignal.so /usr/local/lib/lua/5.1/librestysignal.so + +# OpenResty Upstream Healthcheck +# ############################################################################## +dep-lua-resty-upstream-healthcheck: + curl -sLo /lua-resty-upstream-healthcheck.tar.gz https://github.com/openresty/lua-resty-upstream-healthcheck/archive/v${VER_OPENRESTY_HEALTHCHECK}.tar.gz + tar -C / -xvzf /lua-resty-upstream-healthcheck.tar.gz + cd /lua-resty-upstream-healthcheck-${VER_OPENRESTY_HEALTHCHECK} \ + && make \ + && make install + +# OpenResty Websocket +# ############################################################################## +dep-lua-openresty-websocket: + curl -sLo /lua-openresty-websocket.tar.gz https://github.com/openresty/lua-resty-websocket/archive/v${VER_OPENRESTY_WEBSOCKET}.tar.gz + tar -C / -xvzf /lua-openresty-websocket.tar.gz + cd /lua-resty-websocket-${VER_OPENRESTY_WEBSOCKET} \ + && make \ + && make install + +# LUA Upstream +# ############################################################################## +dep-lua-upstream-nginx-module: + curl -sLo /lua-upstream-nginx-module.tar.gz https://github.com/openresty/lua-upstream-nginx-module/archive/v${VER_LUA_UPSTREAM}.tar.gz + tar -C / -xvzf /lua-upstream-nginx-module.tar.gz + +# Prometheus +# ############################################################################## +dep-nginx-lua-prometheus: + curl -sLo /nginx-lua-prometheus.tar.gz https://github.com/knyar/nginx-lua-prometheus/archive/${VER_PROMETHEUS}.tar.gz + tar -C / -xvzf /nginx-lua-prometheus.tar.gz + mv /nginx-lua-prometheus-${VER_PROMETHEUS}/*.lua ${LUA_LIB_DIR}/ + +# OpenResty Stream Lua +# ############################################################################## +dep-stream-lua-nginx-module: + curl -sLo /stream-lua-nginx-module.zip https://github.com/openresty/stream-lua-nginx-module/archive/v${VER_OPENRESTY_STREAMLUA}.zip + unzip -d / /stream-lua-nginx-module.zip + +# ############################################################################## +# LUAROCKS +# ############################################################################## + +luarocks: + curl -sLo /luarocks.tar.gz https://luarocks.org/releases/luarocks-${VER_LUAROCKS}.tar.gz + tar -C / -xzvf /luarocks.tar.gz + cd /luarocks-${VER_LUAROCKS}; \ + ./configure \ + && make \ + && make install + +################################################################################ +##@ COMPILE LUA +################################################################################ + +lua-src: + curl -sLo /luasrc.tar.gz http://www.lua.org/ftp/lua-${VER_LUA}.tar.gz + tar -C / -xzvf /luasrc.tar.gz + cd /lua-$${VER_LUA}; \ + sed -i "s/DLUA_COMPAT_5_3/DLUA_COMPAT_5_1/" src/Makefile \ + && sed -i "s/DLUA_COMPAT_5_2/DLUA_COMPAT_5_1/" src/Makefile \ + && make linux test \ + && make install \ + && cp /lua-$${VER_LUA}/src/*.h /usr/include/ diff --git a/nginx/1.21.6/debian/11.2/default.conf b/nginx/1.21.6/debian/11.2/default.conf new file mode 100644 index 00000000..4559b82f --- /dev/null +++ b/nginx/1.21.6/debian/11.2/default.conf @@ -0,0 +1,44 @@ +server { + listen 80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/nginx/1.21.6/debian/11.2/docker-entrypoint.sh b/nginx/1.21.6/debian/11.2/docker-entrypoint.sh new file mode 100644 index 00000000..501839b7 --- /dev/null +++ b/nginx/1.21.6/debian/11.2/docker-entrypoint.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +/support.sh + +set -e + +if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then + exec 3>&1 +else + exec 3>/dev/null +fi + +if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then + if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then + echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" + + echo >&3 "$0: Looking for shell scripts in /docker-entrypoint.d/" + find "/docker-entrypoint.d/" -follow -type f -print | sort -n | while read -r f; do + case "$f" in + *.sh) + if [ -x "$f" ]; then + echo >&3 "$0: Launching $f"; + "$f" + else + # warn on shell scripts without exec bit + echo >&3 "$0: Ignoring $f, not executable"; + fi + ;; + *) echo >&3 "$0: Ignoring $f";; + esac + done + + echo >&3 "$0: Configuration complete; ready for start up" + else + echo >&3 "$0: No files found in /docker-entrypoint.d/, skipping configuration" + fi +fi + +exec "$@" diff --git a/nginx/1.21.6/debian/11.2/nginx.conf b/nginx/1.21.6/debian/11.2/nginx.conf new file mode 100644 index 00000000..41d94b46 --- /dev/null +++ b/nginx/1.21.6/debian/11.2/nginx.conf @@ -0,0 +1,31 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/nginx/1.21.6/debian/11.2/support.sh b/nginx/1.21.6/debian/11.2/support.sh new file mode 100644 index 00000000..e981196e --- /dev/null +++ b/nginx/1.21.6/debian/11.2/support.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "💗 Support the Project 💗" +echo "This project is only maintained by one person, Fabio Cicerchia ." +echo "It started as a simple docker image, now it updates automatically periodically and provides support for multiple disto 😎" +echo "Maintaining a project is a very time consuming activity, especially when done alone 💪" +echo "I really want to make this project better and become super cool 🚀" +echo "" +echo "If you'd like to support this open-source project I'll appreciate any kind of contribution ." +echo "" +echo "---" +echo "" + +# track execution runs +if [ "$SKIP_TRACK" != "1" ]; then + curl -m 5 "https://kodebeat.com/nginx-lua/stats/hit/boot.php?os=$DOCKER_IMAGE_OS&v=$VER_NGINX" +fi diff --git a/nginx/1.21.6/fedora/35/10-listen-on-ipv6-by-default.sh b/nginx/1.21.6/fedora/35/10-listen-on-ipv6-by-default.sh new file mode 100644 index 00000000..cd5190db --- /dev/null +++ b/nginx/1.21.6/fedora/35/10-listen-on-ipv6-by-default.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +set -e + +ME=$(basename $0) +DEFAULT_CONF_FILE="etc/nginx/conf.d/default.conf" + +# check if we have ipv6 available +if [ ! -f "/proc/net/if_inet6" ]; then + echo >&3 "$ME: error: ipv6 not available" + exit 0 +fi + +if [ ! -f "/$DEFAULT_CONF_FILE" ]; then + echo >&3 "$ME: error: /$DEFAULT_CONF_FILE is not a file or does not exist" + exit 0 +fi + +# check if the file can be modified, e.g. not on a r/o filesystem +touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: error: can not modify /$DEFAULT_CONF_FILE (read-only file system?)"; exit 0; } + +# check if the file is already modified, e.g. on a container restart +grep -q "listen \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: error: IPv6 listen already enabled"; exit 0; } + +if [ -f "/etc/os-release" ]; then + . /etc/os-release +else + echo >&3 "$ME: error: can not guess the operating system" + exit 0 +fi + +echo >&3 "$ME: Getting the checksum of /$DEFAULT_CONF_FILE" + +#case "$ID" in +# "debian") +# CHECKSUM=$(dpkg-query --show --showformat='${Conffiles}\n' nginx | grep $DEFAULT_CONF_FILE | cut -d' ' -f 3) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | md5sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packaged version" +# exit 0 +# } +# ;; +# "alpine") +# CHECKSUM=$(apk manifest nginx 2>/dev/null| grep $DEFAULT_CONF_FILE | cut -d' ' -f 1 | cut -d ':' -f 2) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | sha1sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packages version" +# exit 0 +# } +# ;; +# *) +# echo >&3 "$ME: error: Unsupported distribution" +# exit 0 +# ;; +#esac + +# enable ipv6 on default.conf listen sockets +sed -i -E 's,listen 80;,listen 80;\n listen [::]:80;,' /$DEFAULT_CONF_FILE + +echo >&3 "$ME: Enabled listen on IPv6 in /$DEFAULT_CONF_FILE" + +exit 0 diff --git a/nginx/1.21.6/fedora/35/20-envsubst-on-templates.sh b/nginx/1.21.6/fedora/35/20-envsubst-on-templates.sh new file mode 100644 index 00000000..4f330295 --- /dev/null +++ b/nginx/1.21.6/fedora/35/20-envsubst-on-templates.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +ME=$(basename $0) + +auto_envsubst() { + local template_dir="${NGINX_ENVSUBST_TEMPLATE_DIR:-/etc/nginx/templates}" + local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}" + local output_dir="${NGINX_ENVSUBST_OUTPUT_DIR:-/etc/nginx/conf.d}" + + local template defined_envs relative_path output_path subdir + defined_envs=$(printf '${%s} ' $(env | cut -d= -f1)) + [ -d "$template_dir" ] || return 0 + if [ ! -w "$output_dir" ]; then + echo >&3 "$ME: ERROR: $template_dir exists, but $output_dir is not writable" + return 0 + fi + find "$template_dir" -follow -type f -name "*$suffix" -print | while read -r template; do + relative_path="${template#$template_dir/}" + output_path="$output_dir/${relative_path%$suffix}" + subdir=$(dirname "$relative_path") + # create a subdirectory where the template file exists + mkdir -p "$output_dir/$subdir" + echo >&3 "$ME: Running envsubst on $template to $output_path" + envsubst "$defined_envs" < "$template" > "$output_path" + done +} + +auto_envsubst + +exit 0 diff --git a/nginx/1.21.6/fedora/35/Makefile b/nginx/1.21.6/fedora/35/Makefile new file mode 100644 index 00000000..a5640431 --- /dev/null +++ b/nginx/1.21.6/fedora/35/Makefile @@ -0,0 +1,233 @@ +# __ __ +# .-----.-----.|__|.-----.--.--.______| |.--.--.---.-. +# | | _ || || |_ _|______| || | | _ | +# |__|__|___ ||__||__|__|__.__| |__||_____|___._| +# |_____| +# +# Copyright (c) 2022 Fabio Cicerchia. https://fabiocicerchia.it. MIT License +# Repo: https://github.com/fabiocicerchia/nginx-lua + +EXTENDED_IMAGE=YES +NPROC := $(shell nproc) + +# ############################################################################## +# CORE +# ############################################################################## + +core: +# NGINX +# ############################################################################## +# we're on an architecture upstream doesn't officially build for +# let's build binaries from the published packaging sources +# TODO: need to get all patches from openresty? +# TODO: Find a better way to fallback when openresty is behind the nginx latest version and no patch is available + curl -sLo /nginx.tar.gz https://nginx.org/download/nginx-${VER_NGINX}.tar.gz + tar -C / -xvzf /nginx.tar.gz + mkdir -p /var/cache/nginx/client_temp \ + /var/cache/nginx/proxy_temp \ + /var/cache/nginx/fastcgi_temp \ + /var/cache/nginx/uwsgi_temp \ + /var/cache/nginx/scgi_temp + cd /nginx-${VER_NGINX} \ + && (curl --fail -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-${VER_NGINX}-socket_cloexec.patch || \ + curl -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.21.4-socket_cloexec.patch) \ + && patch -p1 < nginx-socket_cloexec.patch || exit 1 \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" --with-debug \ + && make -j $(NPROC) build \ + && mv objs/nginx objs/nginx-debug \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" \ + && make -j $(NPROC) build \ + && make -j $(NPROC) modules \ + && install -m755 objs/nginx-debug /usr/sbin/nginx-debug \ + && make -j $(NPROC) install + +# ############################################################################## +# DEPENDENCIES +# ############################################################################## + +deps: dep-ngx_devel_kit dep-luajit dep-lua-nginx dep-lua-resty-core dep-lua-resty-lrucache +ifeq ($(EXTENDED_IMAGE), YES) + make dep-headers-more-nginx-module dep-lua-resty-cookie dep-lua-openresty-dns dep-lua-openresty-memcached dep-lua-openresty-mysql dep-lua-openresty-redis dep-lua-openresty-shell dep-lua-openresty-tablepool dep-lua-openresty-signal dep-lua-resty-upstream-healthcheck dep-lua-openresty-websocket dep-lua-upstream-nginx-module dep-nginx-lua-prometheus dep-stream-lua-nginx-module +endif + +# NGX Devel Kit +# ############################################################################## +dep-ngx_devel_kit: + curl -sLo /ngx_devel_kit.tar.gz https://github.com/vision5/ngx_devel_kit/archive/v${VER_NGX_DEVEL_KIT}.tar.gz + tar -C / -xvzf /ngx_devel_kit.tar.gz + +# OpenResty LUAJIT2 +# ############################################################################## +dep-luajit: + curl -sLo /luajit.tar.gz https://github.com/openresty/luajit2/archive/v${VER_LUAJIT}.tar.gz + tar -C / -xvzf /luajit.tar.gz + cd /luajit2-${VER_LUAJIT} \ + && make \ + && make install + +# Lua Nginx Module +# ############################################################################## +dep-lua-nginx: + curl -sLo /lua-nginx.tar.gz https://github.com/openresty/lua-nginx-module/archive/v${VER_LUA_NGINX_MODULE}.tar.gz + tar -C / -xvzf /lua-nginx.tar.gz + +# LUA Resty Core +# ############################################################################## +dep-lua-resty-core: + curl -sLo /lua-resty-core.tar.gz https://github.com/openresty/lua-resty-core/archive/v${VER_LUA_RESTY_CORE}.tar.gz + tar -C / -xvzf /lua-resty-core.tar.gz + cd /lua-resty-core-${VER_LUA_RESTY_CORE} \ + && make \ + && make install + +# LUA Resty LRUCache +# ############################################################################## +dep-lua-resty-lrucache: + curl -sLo /lua-resty-lrucache.tar.gz https://github.com/openresty/lua-resty-lrucache/archive/v${VER_LUA_RESTY_LRUCACHE}.tar.gz + tar -C / -xvzf /lua-resty-lrucache.tar.gz + cd /lua-resty-lrucache-${VER_LUA_RESTY_LRUCACHE} \ + && make \ + && make install + +# OpenResty Headers +# ############################################################################## +dep-headers-more-nginx-module: + curl -sLo /headers-more-nginx-module.zip https://github.com/openresty/headers-more-nginx-module/archive/${VER_OPENRESTY_HEADERS}.zip + unzip -d / /headers-more-nginx-module.zip + +# Cloudflare Cookie +# ############################################################################## +dep-lua-resty-cookie: + curl -sLo /lua-resty-cookie.tar.gz https://github.com/cloudflare/lua-resty-cookie/archive/${VER_CLOUDFLARE_COOKIE}.tar.gz + tar -C / -xvzf /lua-resty-cookie.tar.gz + cd /lua-resty-cookie-${VER_CLOUDFLARE_COOKIE} \ + && make \ + && make install + +# OpenResty Dns +# ############################################################################## +dep-lua-openresty-dns: + curl -sLo /lua-openresty-dns.tar.gz https://github.com/openresty/lua-resty-dns/archive/v${VER_OPENRESTY_DNS}.tar.gz + tar -C / -xvzf /lua-openresty-dns.tar.gz + cd /lua-resty-dns-${VER_OPENRESTY_DNS} \ + && make \ + && make install + +# OpenResty Memcached +# ############################################################################## +dep-lua-openresty-memcached: + curl -sLo /lua-openresty-memcached.tar.gz https://github.com/openresty/lua-resty-memcached/archive/v${VER_OPENRESTY_MEMCACHED}.tar.gz + tar -C / -xvzf /lua-openresty-memcached.tar.gz + cd /lua-resty-memcached-${VER_OPENRESTY_MEMCACHED} \ + && make \ + && make install + +# OpenResty Mysql +# ############################################################################## +dep-lua-openresty-mysql: + curl -sLo /lua-openresty-mysql.tar.gz https://github.com/openresty/lua-resty-mysql/archive/v${VER_OPENRESTY_MYSQL}.tar.gz + tar -C / -xvzf /lua-openresty-mysql.tar.gz + cd /lua-resty-mysql-${VER_OPENRESTY_MYSQL} \ + && make \ + && make install + +# OpenResty Redis +# ############################################################################## +dep-lua-openresty-redis: + curl -sLo /lua-openresty-redis.tar.gz https://github.com/openresty/lua-resty-redis/archive/v${VER_OPENRESTY_REDIS}.tar.gz + tar -C / -xvzf /lua-openresty-redis.tar.gz + cd /lua-resty-redis-${VER_OPENRESTY_REDIS} \ + && make \ + && make install + +# OpenResty Shell +# ############################################################################## +dep-lua-openresty-shell: + curl -sLo /lua-openresty-shell.tar.gz https://github.com/openresty/lua-resty-shell/archive/v${VER_OPENRESTY_SHELL}.tar.gz + tar -C / -xvzf /lua-openresty-shell.tar.gz + cd /lua-resty-shell-${VER_OPENRESTY_SHELL} \ + && make \ + && make install + +# OpenResty Tablepool +# ############################################################################## +dep-lua-openresty-tablepool: + curl -sLo /lua-tablepool.tar.gz https://github.com/openresty/lua-tablepool/archive/refs/tags/v${VER_OPENRESTY_TABLEPOOL}.tar.gz + tar -C / -xvzf /lua-tablepool.tar.gz + cd /lua-tablepool-${VER_OPENRESTY_TABLEPOOL} \ + && make \ + && make install + +# OpenResty Signal +# ############################################################################## +dep-lua-openresty-signal: + curl -sLo /lua-openresty-signal.tar.gz https://github.com/openresty/lua-resty-signal/archive/refs/tags/v${VER_OPENRESTY_SIGNAL}.tar.gz + tar -C / -xvzf /lua-openresty-signal.tar.gz + cd /lua-resty-signal-${VER_OPENRESTY_SIGNAL} \ + && make \ + && make install \ + && install -d /usr/local/lib/lua/5.1 \ + && install /usr/local/share/lua/5.1/librestysignal.so /usr/local/lib/lua/5.1/librestysignal.so + +# OpenResty Upstream Healthcheck +# ############################################################################## +dep-lua-resty-upstream-healthcheck: + curl -sLo /lua-resty-upstream-healthcheck.tar.gz https://github.com/openresty/lua-resty-upstream-healthcheck/archive/v${VER_OPENRESTY_HEALTHCHECK}.tar.gz + tar -C / -xvzf /lua-resty-upstream-healthcheck.tar.gz + cd /lua-resty-upstream-healthcheck-${VER_OPENRESTY_HEALTHCHECK} \ + && make \ + && make install + +# OpenResty Websocket +# ############################################################################## +dep-lua-openresty-websocket: + curl -sLo /lua-openresty-websocket.tar.gz https://github.com/openresty/lua-resty-websocket/archive/v${VER_OPENRESTY_WEBSOCKET}.tar.gz + tar -C / -xvzf /lua-openresty-websocket.tar.gz + cd /lua-resty-websocket-${VER_OPENRESTY_WEBSOCKET} \ + && make \ + && make install + +# LUA Upstream +# ############################################################################## +dep-lua-upstream-nginx-module: + curl -sLo /lua-upstream-nginx-module.tar.gz https://github.com/openresty/lua-upstream-nginx-module/archive/v${VER_LUA_UPSTREAM}.tar.gz + tar -C / -xvzf /lua-upstream-nginx-module.tar.gz + +# Prometheus +# ############################################################################## +dep-nginx-lua-prometheus: + curl -sLo /nginx-lua-prometheus.tar.gz https://github.com/knyar/nginx-lua-prometheus/archive/${VER_PROMETHEUS}.tar.gz + tar -C / -xvzf /nginx-lua-prometheus.tar.gz + mv /nginx-lua-prometheus-${VER_PROMETHEUS}/*.lua ${LUA_LIB_DIR}/ + +# OpenResty Stream Lua +# ############################################################################## +dep-stream-lua-nginx-module: + curl -sLo /stream-lua-nginx-module.zip https://github.com/openresty/stream-lua-nginx-module/archive/v${VER_OPENRESTY_STREAMLUA}.zip + unzip -d / /stream-lua-nginx-module.zip + +# ############################################################################## +# LUAROCKS +# ############################################################################## + +luarocks: + curl -sLo /luarocks.tar.gz https://luarocks.org/releases/luarocks-${VER_LUAROCKS}.tar.gz + tar -C / -xzvf /luarocks.tar.gz + cd /luarocks-${VER_LUAROCKS}; \ + ./configure \ + && make \ + && make install + +################################################################################ +##@ COMPILE LUA +################################################################################ + +lua-src: + curl -sLo /luasrc.tar.gz http://www.lua.org/ftp/lua-${VER_LUA}.tar.gz + tar -C / -xzvf /luasrc.tar.gz + cd /lua-$${VER_LUA}; \ + sed -i "s/DLUA_COMPAT_5_3/DLUA_COMPAT_5_1/" src/Makefile \ + && sed -i "s/DLUA_COMPAT_5_2/DLUA_COMPAT_5_1/" src/Makefile \ + && make linux test \ + && make install \ + && cp /lua-$${VER_LUA}/src/*.h /usr/include/ diff --git a/nginx/1.21.6/fedora/35/default.conf b/nginx/1.21.6/fedora/35/default.conf new file mode 100644 index 00000000..4559b82f --- /dev/null +++ b/nginx/1.21.6/fedora/35/default.conf @@ -0,0 +1,44 @@ +server { + listen 80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/nginx/1.21.6/fedora/35/docker-entrypoint.sh b/nginx/1.21.6/fedora/35/docker-entrypoint.sh new file mode 100644 index 00000000..501839b7 --- /dev/null +++ b/nginx/1.21.6/fedora/35/docker-entrypoint.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +/support.sh + +set -e + +if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then + exec 3>&1 +else + exec 3>/dev/null +fi + +if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then + if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then + echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" + + echo >&3 "$0: Looking for shell scripts in /docker-entrypoint.d/" + find "/docker-entrypoint.d/" -follow -type f -print | sort -n | while read -r f; do + case "$f" in + *.sh) + if [ -x "$f" ]; then + echo >&3 "$0: Launching $f"; + "$f" + else + # warn on shell scripts without exec bit + echo >&3 "$0: Ignoring $f, not executable"; + fi + ;; + *) echo >&3 "$0: Ignoring $f";; + esac + done + + echo >&3 "$0: Configuration complete; ready for start up" + else + echo >&3 "$0: No files found in /docker-entrypoint.d/, skipping configuration" + fi +fi + +exec "$@" diff --git a/nginx/1.21.6/fedora/35/nginx.conf b/nginx/1.21.6/fedora/35/nginx.conf new file mode 100644 index 00000000..41d94b46 --- /dev/null +++ b/nginx/1.21.6/fedora/35/nginx.conf @@ -0,0 +1,31 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/nginx/1.21.6/fedora/35/support.sh b/nginx/1.21.6/fedora/35/support.sh new file mode 100644 index 00000000..e981196e --- /dev/null +++ b/nginx/1.21.6/fedora/35/support.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "💗 Support the Project 💗" +echo "This project is only maintained by one person, Fabio Cicerchia ." +echo "It started as a simple docker image, now it updates automatically periodically and provides support for multiple disto 😎" +echo "Maintaining a project is a very time consuming activity, especially when done alone 💪" +echo "I really want to make this project better and become super cool 🚀" +echo "" +echo "If you'd like to support this open-source project I'll appreciate any kind of contribution ." +echo "" +echo "---" +echo "" + +# track execution runs +if [ "$SKIP_TRACK" != "1" ]; then + curl -m 5 "https://kodebeat.com/nginx-lua/stats/hit/boot.php?os=$DOCKER_IMAGE_OS&v=$VER_NGINX" +fi diff --git a/nginx/1.21.6/ubuntu/20.04/10-listen-on-ipv6-by-default.sh b/nginx/1.21.6/ubuntu/20.04/10-listen-on-ipv6-by-default.sh new file mode 100644 index 00000000..cd5190db --- /dev/null +++ b/nginx/1.21.6/ubuntu/20.04/10-listen-on-ipv6-by-default.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +set -e + +ME=$(basename $0) +DEFAULT_CONF_FILE="etc/nginx/conf.d/default.conf" + +# check if we have ipv6 available +if [ ! -f "/proc/net/if_inet6" ]; then + echo >&3 "$ME: error: ipv6 not available" + exit 0 +fi + +if [ ! -f "/$DEFAULT_CONF_FILE" ]; then + echo >&3 "$ME: error: /$DEFAULT_CONF_FILE is not a file or does not exist" + exit 0 +fi + +# check if the file can be modified, e.g. not on a r/o filesystem +touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: error: can not modify /$DEFAULT_CONF_FILE (read-only file system?)"; exit 0; } + +# check if the file is already modified, e.g. on a container restart +grep -q "listen \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: error: IPv6 listen already enabled"; exit 0; } + +if [ -f "/etc/os-release" ]; then + . /etc/os-release +else + echo >&3 "$ME: error: can not guess the operating system" + exit 0 +fi + +echo >&3 "$ME: Getting the checksum of /$DEFAULT_CONF_FILE" + +#case "$ID" in +# "debian") +# CHECKSUM=$(dpkg-query --show --showformat='${Conffiles}\n' nginx | grep $DEFAULT_CONF_FILE | cut -d' ' -f 3) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | md5sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packaged version" +# exit 0 +# } +# ;; +# "alpine") +# CHECKSUM=$(apk manifest nginx 2>/dev/null| grep $DEFAULT_CONF_FILE | cut -d' ' -f 1 | cut -d ':' -f 2) +# echo "$CHECKSUM /$DEFAULT_CONF_FILE" | sha1sum -c - >/dev/null 2>&1 || { +# echo >&3 "$ME: error: /$DEFAULT_CONF_FILE differs from the packages version" +# exit 0 +# } +# ;; +# *) +# echo >&3 "$ME: error: Unsupported distribution" +# exit 0 +# ;; +#esac + +# enable ipv6 on default.conf listen sockets +sed -i -E 's,listen 80;,listen 80;\n listen [::]:80;,' /$DEFAULT_CONF_FILE + +echo >&3 "$ME: Enabled listen on IPv6 in /$DEFAULT_CONF_FILE" + +exit 0 diff --git a/nginx/1.21.6/ubuntu/20.04/20-envsubst-on-templates.sh b/nginx/1.21.6/ubuntu/20.04/20-envsubst-on-templates.sh new file mode 100644 index 00000000..4f330295 --- /dev/null +++ b/nginx/1.21.6/ubuntu/20.04/20-envsubst-on-templates.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +ME=$(basename $0) + +auto_envsubst() { + local template_dir="${NGINX_ENVSUBST_TEMPLATE_DIR:-/etc/nginx/templates}" + local suffix="${NGINX_ENVSUBST_TEMPLATE_SUFFIX:-.template}" + local output_dir="${NGINX_ENVSUBST_OUTPUT_DIR:-/etc/nginx/conf.d}" + + local template defined_envs relative_path output_path subdir + defined_envs=$(printf '${%s} ' $(env | cut -d= -f1)) + [ -d "$template_dir" ] || return 0 + if [ ! -w "$output_dir" ]; then + echo >&3 "$ME: ERROR: $template_dir exists, but $output_dir is not writable" + return 0 + fi + find "$template_dir" -follow -type f -name "*$suffix" -print | while read -r template; do + relative_path="${template#$template_dir/}" + output_path="$output_dir/${relative_path%$suffix}" + subdir=$(dirname "$relative_path") + # create a subdirectory where the template file exists + mkdir -p "$output_dir/$subdir" + echo >&3 "$ME: Running envsubst on $template to $output_path" + envsubst "$defined_envs" < "$template" > "$output_path" + done +} + +auto_envsubst + +exit 0 diff --git a/nginx/1.21.6/ubuntu/20.04/Makefile b/nginx/1.21.6/ubuntu/20.04/Makefile new file mode 100644 index 00000000..a5640431 --- /dev/null +++ b/nginx/1.21.6/ubuntu/20.04/Makefile @@ -0,0 +1,233 @@ +# __ __ +# .-----.-----.|__|.-----.--.--.______| |.--.--.---.-. +# | | _ || || |_ _|______| || | | _ | +# |__|__|___ ||__||__|__|__.__| |__||_____|___._| +# |_____| +# +# Copyright (c) 2022 Fabio Cicerchia. https://fabiocicerchia.it. MIT License +# Repo: https://github.com/fabiocicerchia/nginx-lua + +EXTENDED_IMAGE=YES +NPROC := $(shell nproc) + +# ############################################################################## +# CORE +# ############################################################################## + +core: +# NGINX +# ############################################################################## +# we're on an architecture upstream doesn't officially build for +# let's build binaries from the published packaging sources +# TODO: need to get all patches from openresty? +# TODO: Find a better way to fallback when openresty is behind the nginx latest version and no patch is available + curl -sLo /nginx.tar.gz https://nginx.org/download/nginx-${VER_NGINX}.tar.gz + tar -C / -xvzf /nginx.tar.gz + mkdir -p /var/cache/nginx/client_temp \ + /var/cache/nginx/proxy_temp \ + /var/cache/nginx/fastcgi_temp \ + /var/cache/nginx/uwsgi_temp \ + /var/cache/nginx/scgi_temp + cd /nginx-${VER_NGINX} \ + && (curl --fail -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-${VER_NGINX}-socket_cloexec.patch || \ + curl -sLo nginx-socket_cloexec.patch https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-1.21.4-socket_cloexec.patch) \ + && patch -p1 < nginx-socket_cloexec.patch || exit 1 \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" --with-debug \ + && make -j $(NPROC) build \ + && mv objs/nginx objs/nginx-debug \ + && ./configure ${NGINX_BUILD_CONFIG} --with-cc-opt="$(NGX_CFLAGS)" --with-ld-opt="$(NGX_LDOPT)" \ + && make -j $(NPROC) build \ + && make -j $(NPROC) modules \ + && install -m755 objs/nginx-debug /usr/sbin/nginx-debug \ + && make -j $(NPROC) install + +# ############################################################################## +# DEPENDENCIES +# ############################################################################## + +deps: dep-ngx_devel_kit dep-luajit dep-lua-nginx dep-lua-resty-core dep-lua-resty-lrucache +ifeq ($(EXTENDED_IMAGE), YES) + make dep-headers-more-nginx-module dep-lua-resty-cookie dep-lua-openresty-dns dep-lua-openresty-memcached dep-lua-openresty-mysql dep-lua-openresty-redis dep-lua-openresty-shell dep-lua-openresty-tablepool dep-lua-openresty-signal dep-lua-resty-upstream-healthcheck dep-lua-openresty-websocket dep-lua-upstream-nginx-module dep-nginx-lua-prometheus dep-stream-lua-nginx-module +endif + +# NGX Devel Kit +# ############################################################################## +dep-ngx_devel_kit: + curl -sLo /ngx_devel_kit.tar.gz https://github.com/vision5/ngx_devel_kit/archive/v${VER_NGX_DEVEL_KIT}.tar.gz + tar -C / -xvzf /ngx_devel_kit.tar.gz + +# OpenResty LUAJIT2 +# ############################################################################## +dep-luajit: + curl -sLo /luajit.tar.gz https://github.com/openresty/luajit2/archive/v${VER_LUAJIT}.tar.gz + tar -C / -xvzf /luajit.tar.gz + cd /luajit2-${VER_LUAJIT} \ + && make \ + && make install + +# Lua Nginx Module +# ############################################################################## +dep-lua-nginx: + curl -sLo /lua-nginx.tar.gz https://github.com/openresty/lua-nginx-module/archive/v${VER_LUA_NGINX_MODULE}.tar.gz + tar -C / -xvzf /lua-nginx.tar.gz + +# LUA Resty Core +# ############################################################################## +dep-lua-resty-core: + curl -sLo /lua-resty-core.tar.gz https://github.com/openresty/lua-resty-core/archive/v${VER_LUA_RESTY_CORE}.tar.gz + tar -C / -xvzf /lua-resty-core.tar.gz + cd /lua-resty-core-${VER_LUA_RESTY_CORE} \ + && make \ + && make install + +# LUA Resty LRUCache +# ############################################################################## +dep-lua-resty-lrucache: + curl -sLo /lua-resty-lrucache.tar.gz https://github.com/openresty/lua-resty-lrucache/archive/v${VER_LUA_RESTY_LRUCACHE}.tar.gz + tar -C / -xvzf /lua-resty-lrucache.tar.gz + cd /lua-resty-lrucache-${VER_LUA_RESTY_LRUCACHE} \ + && make \ + && make install + +# OpenResty Headers +# ############################################################################## +dep-headers-more-nginx-module: + curl -sLo /headers-more-nginx-module.zip https://github.com/openresty/headers-more-nginx-module/archive/${VER_OPENRESTY_HEADERS}.zip + unzip -d / /headers-more-nginx-module.zip + +# Cloudflare Cookie +# ############################################################################## +dep-lua-resty-cookie: + curl -sLo /lua-resty-cookie.tar.gz https://github.com/cloudflare/lua-resty-cookie/archive/${VER_CLOUDFLARE_COOKIE}.tar.gz + tar -C / -xvzf /lua-resty-cookie.tar.gz + cd /lua-resty-cookie-${VER_CLOUDFLARE_COOKIE} \ + && make \ + && make install + +# OpenResty Dns +# ############################################################################## +dep-lua-openresty-dns: + curl -sLo /lua-openresty-dns.tar.gz https://github.com/openresty/lua-resty-dns/archive/v${VER_OPENRESTY_DNS}.tar.gz + tar -C / -xvzf /lua-openresty-dns.tar.gz + cd /lua-resty-dns-${VER_OPENRESTY_DNS} \ + && make \ + && make install + +# OpenResty Memcached +# ############################################################################## +dep-lua-openresty-memcached: + curl -sLo /lua-openresty-memcached.tar.gz https://github.com/openresty/lua-resty-memcached/archive/v${VER_OPENRESTY_MEMCACHED}.tar.gz + tar -C / -xvzf /lua-openresty-memcached.tar.gz + cd /lua-resty-memcached-${VER_OPENRESTY_MEMCACHED} \ + && make \ + && make install + +# OpenResty Mysql +# ############################################################################## +dep-lua-openresty-mysql: + curl -sLo /lua-openresty-mysql.tar.gz https://github.com/openresty/lua-resty-mysql/archive/v${VER_OPENRESTY_MYSQL}.tar.gz + tar -C / -xvzf /lua-openresty-mysql.tar.gz + cd /lua-resty-mysql-${VER_OPENRESTY_MYSQL} \ + && make \ + && make install + +# OpenResty Redis +# ############################################################################## +dep-lua-openresty-redis: + curl -sLo /lua-openresty-redis.tar.gz https://github.com/openresty/lua-resty-redis/archive/v${VER_OPENRESTY_REDIS}.tar.gz + tar -C / -xvzf /lua-openresty-redis.tar.gz + cd /lua-resty-redis-${VER_OPENRESTY_REDIS} \ + && make \ + && make install + +# OpenResty Shell +# ############################################################################## +dep-lua-openresty-shell: + curl -sLo /lua-openresty-shell.tar.gz https://github.com/openresty/lua-resty-shell/archive/v${VER_OPENRESTY_SHELL}.tar.gz + tar -C / -xvzf /lua-openresty-shell.tar.gz + cd /lua-resty-shell-${VER_OPENRESTY_SHELL} \ + && make \ + && make install + +# OpenResty Tablepool +# ############################################################################## +dep-lua-openresty-tablepool: + curl -sLo /lua-tablepool.tar.gz https://github.com/openresty/lua-tablepool/archive/refs/tags/v${VER_OPENRESTY_TABLEPOOL}.tar.gz + tar -C / -xvzf /lua-tablepool.tar.gz + cd /lua-tablepool-${VER_OPENRESTY_TABLEPOOL} \ + && make \ + && make install + +# OpenResty Signal +# ############################################################################## +dep-lua-openresty-signal: + curl -sLo /lua-openresty-signal.tar.gz https://github.com/openresty/lua-resty-signal/archive/refs/tags/v${VER_OPENRESTY_SIGNAL}.tar.gz + tar -C / -xvzf /lua-openresty-signal.tar.gz + cd /lua-resty-signal-${VER_OPENRESTY_SIGNAL} \ + && make \ + && make install \ + && install -d /usr/local/lib/lua/5.1 \ + && install /usr/local/share/lua/5.1/librestysignal.so /usr/local/lib/lua/5.1/librestysignal.so + +# OpenResty Upstream Healthcheck +# ############################################################################## +dep-lua-resty-upstream-healthcheck: + curl -sLo /lua-resty-upstream-healthcheck.tar.gz https://github.com/openresty/lua-resty-upstream-healthcheck/archive/v${VER_OPENRESTY_HEALTHCHECK}.tar.gz + tar -C / -xvzf /lua-resty-upstream-healthcheck.tar.gz + cd /lua-resty-upstream-healthcheck-${VER_OPENRESTY_HEALTHCHECK} \ + && make \ + && make install + +# OpenResty Websocket +# ############################################################################## +dep-lua-openresty-websocket: + curl -sLo /lua-openresty-websocket.tar.gz https://github.com/openresty/lua-resty-websocket/archive/v${VER_OPENRESTY_WEBSOCKET}.tar.gz + tar -C / -xvzf /lua-openresty-websocket.tar.gz + cd /lua-resty-websocket-${VER_OPENRESTY_WEBSOCKET} \ + && make \ + && make install + +# LUA Upstream +# ############################################################################## +dep-lua-upstream-nginx-module: + curl -sLo /lua-upstream-nginx-module.tar.gz https://github.com/openresty/lua-upstream-nginx-module/archive/v${VER_LUA_UPSTREAM}.tar.gz + tar -C / -xvzf /lua-upstream-nginx-module.tar.gz + +# Prometheus +# ############################################################################## +dep-nginx-lua-prometheus: + curl -sLo /nginx-lua-prometheus.tar.gz https://github.com/knyar/nginx-lua-prometheus/archive/${VER_PROMETHEUS}.tar.gz + tar -C / -xvzf /nginx-lua-prometheus.tar.gz + mv /nginx-lua-prometheus-${VER_PROMETHEUS}/*.lua ${LUA_LIB_DIR}/ + +# OpenResty Stream Lua +# ############################################################################## +dep-stream-lua-nginx-module: + curl -sLo /stream-lua-nginx-module.zip https://github.com/openresty/stream-lua-nginx-module/archive/v${VER_OPENRESTY_STREAMLUA}.zip + unzip -d / /stream-lua-nginx-module.zip + +# ############################################################################## +# LUAROCKS +# ############################################################################## + +luarocks: + curl -sLo /luarocks.tar.gz https://luarocks.org/releases/luarocks-${VER_LUAROCKS}.tar.gz + tar -C / -xzvf /luarocks.tar.gz + cd /luarocks-${VER_LUAROCKS}; \ + ./configure \ + && make \ + && make install + +################################################################################ +##@ COMPILE LUA +################################################################################ + +lua-src: + curl -sLo /luasrc.tar.gz http://www.lua.org/ftp/lua-${VER_LUA}.tar.gz + tar -C / -xzvf /luasrc.tar.gz + cd /lua-$${VER_LUA}; \ + sed -i "s/DLUA_COMPAT_5_3/DLUA_COMPAT_5_1/" src/Makefile \ + && sed -i "s/DLUA_COMPAT_5_2/DLUA_COMPAT_5_1/" src/Makefile \ + && make linux test \ + && make install \ + && cp /lua-$${VER_LUA}/src/*.h /usr/include/ diff --git a/nginx/1.21.6/ubuntu/20.04/default.conf b/nginx/1.21.6/ubuntu/20.04/default.conf new file mode 100644 index 00000000..4559b82f --- /dev/null +++ b/nginx/1.21.6/ubuntu/20.04/default.conf @@ -0,0 +1,44 @@ +server { + listen 80; + server_name localhost; + + #charset koi8-r; + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} diff --git a/nginx/1.21.6/ubuntu/20.04/docker-entrypoint.sh b/nginx/1.21.6/ubuntu/20.04/docker-entrypoint.sh new file mode 100644 index 00000000..501839b7 --- /dev/null +++ b/nginx/1.21.6/ubuntu/20.04/docker-entrypoint.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# vim:sw=4:ts=4:et + +/support.sh + +set -e + +if [ -z "${NGINX_ENTRYPOINT_QUIET_LOGS:-}" ]; then + exec 3>&1 +else + exec 3>/dev/null +fi + +if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then + if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then + echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" + + echo >&3 "$0: Looking for shell scripts in /docker-entrypoint.d/" + find "/docker-entrypoint.d/" -follow -type f -print | sort -n | while read -r f; do + case "$f" in + *.sh) + if [ -x "$f" ]; then + echo >&3 "$0: Launching $f"; + "$f" + else + # warn on shell scripts without exec bit + echo >&3 "$0: Ignoring $f, not executable"; + fi + ;; + *) echo >&3 "$0: Ignoring $f";; + esac + done + + echo >&3 "$0: Configuration complete; ready for start up" + else + echo >&3 "$0: No files found in /docker-entrypoint.d/, skipping configuration" + fi +fi + +exec "$@" diff --git a/nginx/1.21.6/ubuntu/20.04/nginx.conf b/nginx/1.21.6/ubuntu/20.04/nginx.conf new file mode 100644 index 00000000..41d94b46 --- /dev/null +++ b/nginx/1.21.6/ubuntu/20.04/nginx.conf @@ -0,0 +1,31 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/nginx/1.21.6/ubuntu/20.04/support.sh b/nginx/1.21.6/ubuntu/20.04/support.sh new file mode 100644 index 00000000..e981196e --- /dev/null +++ b/nginx/1.21.6/ubuntu/20.04/support.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +echo "💗 Support the Project 💗" +echo "This project is only maintained by one person, Fabio Cicerchia ." +echo "It started as a simple docker image, now it updates automatically periodically and provides support for multiple disto 😎" +echo "Maintaining a project is a very time consuming activity, especially when done alone 💪" +echo "I really want to make this project better and become super cool 🚀" +echo "" +echo "If you'd like to support this open-source project I'll appreciate any kind of contribution ." +echo "" +echo "---" +echo "" + +# track execution runs +if [ "$SKIP_TRACK" != "1" ]; then + curl -m 5 "https://kodebeat.com/nginx-lua/stats/hit/boot.php?os=$DOCKER_IMAGE_OS&v=$VER_NGINX" +fi diff --git a/supported_versions b/supported_versions index e92eae30..062633c3 100644 --- a/supported_versions +++ b/supported_versions @@ -1,5 +1,5 @@ nginx=1.21.6 -almalinux=8.5-20211112 +almalinux=8.5-20220306 alpine=3.15.0 amazonlinux=2.0.20220218.1 debian=11.2