Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.31.8-1

* Remove the `acme`, `geoip`, `image-filter`, `njs` and `xslt` dynamic
modules.
* Remove `curl`.

## 1.31.8

* Upgrade to Nginx 1.31.8.
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ FROM nginx:1.31.8-trixie

ENV NGINX_ENTRYPOINT_QUIET_LOGS=1

# Remove dynamic modules and tools that upstream installs but we don't use
RUN apt-get purge -y --auto-remove \
curl \
nginx-module-acme \
nginx-module-geoip \
nginx-module-image-filter \
nginx-module-njs \
nginx-module-xslt && \
rm -rf /var/lib/apt/lists/*

# Override default configuration files
COPY ./config/nginx.conf /etc/nginx/nginx.conf
COPY ./config/default.conf /etc/nginx/conf.d/default.conf
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ https://wikipedia.org/wiki/nginx

## How does this differ from upstream?

Currently, the only difference is that we use `SIGQUIT` as the [`STOPSIGNAL`](https://docs.docker.com/engine/reference/builder/#stopsignal) whereas upstream uses the default i.e. `SIGTERM`. Using `SIGQUIT` is better for our use-case as it ensures that nginx will perform a [graceful shutdown](https://docs.nginx.com/nginx/admin-guide/basic-functionality/runtime-control/).
* We use `SIGQUIT` as the [`STOPSIGNAL`](https://docs.docker.com/engine/reference/builder/#stopsignal) whereas upstream uses the default i.e. `SIGTERM`. Using `SIGQUIT` is better for our use-case as it ensures that nginx will perform a [graceful shutdown](https://docs.nginx.com/nginx/admin-guide/basic-functionality/runtime-control/).
* We remove the `acme`, `geoip`, `image-filter`, `njs` and `xslt` dynamic modules and `curl`, which upstream installs but we don't use. This keeps their libraries, and the vulnerabilities reported against them, out of the image. Install them in a derived image if you need them.

## Usage

Expand Down
Loading