Replace React build Dockerfile with NGINX 1.29.4 on Debian Trixie #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces the multi-stage Node.js/React build Dockerfile with a standalone NGINX 1.29.4 configuration based on Debian Trixie slim, per the official NGINX Docker repository pattern.
Changes
Dockerfile
debian:trixie-sliminstead ofnode:18-alpine+nginx:alpineEntrypoint Scripts
docker-entrypoint.sh: Orchestrates initialization by sourcing.envshfiles and executing.shfiles from/docker-entrypoint.d/10-listen-on-ipv6-by-default.sh: Patches default.conf to enable IPv6 listeners15-local-resolvers.envsh: Exports Docker's embedded DNS (127.0.0.11) when present20-envsubst-on-templates.sh: Applies environment variable substitution to template files30-tune-worker-processes.sh: Auto-tunes worker processes based on cgroup v1/v2 limits with fallback tonprocAll scripts follow standard NGINX Docker conventions with proper error handling and exit codes.
Original prompt
NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
PLEASE DO NOT EDIT IT DIRECTLY.
FROM debian:trixie-slim
LABEL maintainer="NGINX Docker Maintainers docker-maint@nginx.com"
ENV NGINX_VERSION 1.29.4
ENV NJS_VERSION 0.9.4
ENV NJS_RELEASE 1
trixietrixieENV PKG_RELEASE 1
ENV DYNPKG_RELEASE 1~trixie
RUN set -x \
create nginx user/group first, to be consistent throughout docker variants
arches officialy built by upstream
we're on an architecture upstream doesn't officially build for
let's build binaries from the published packaging sources
new directory for storing sources and .deb files
(777 to ensure APT's "_apt" user can access it too)
save list of currently-installed packages so build dependencies can be cleanly removed later
build .deb files from upstream's packaging sources
we don't remove APT lists here because they get re-downloaded and removed later
reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
(which is done after we install the built packages so we don't have to redownload any overlapping dependencies)
...
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.