Skip to content

build: pin nginx base image version for reproducible builds#220

Open
andrerfneves wants to merge 1 commit into
mainfrom
maintenance/pin-nginx-version-20260626
Open

build: pin nginx base image version for reproducible builds#220
andrerfneves wants to merge 1 commit into
mainfrom
maintenance/pin-nginx-version-20260626

Conversation

@andrerfneves

Copy link
Copy Markdown
Owner

Summary

Pins the nginx base image from the floating :alpine tag to nginx:1.25-alpine for reproducible Docker builds.

Why

The builder stage already uses FROM node:20-alpine (pinned to the v20 series), but the production stage used FROM nginx:alpine — a floating tag that follows the latest stable nginx release. This means:

  • A new nginx major version (e.g., nginx 1.26 or 2.0) could ship and break the build without any code changes
  • Two developers building on different days could get different nginx versions in their images
  • Reproducible builds require deterministic base images

Pinning to nginx:1.25-alpine follows the same pattern as node:20-alpine — it tracks patch releases within a stable series while preventing unexpected major version jumps.

Changes

  • Dockerfile: Changed FROM nginx:alpineFROM nginx:1.25-alpine

Test Plan

  • Docker build succeeds
  • All 52 existing tests pass
  • No behavior change — same nginx configuration, same alpine base

Change FROM nginx:alpine to FROM nginx:1.25-alpine to use a pinned
version tag instead of the floating :alpine tag. The builder stage
already pins Node.js to node:20-alpine, making the production stage
the only unpinned image.

Using a floating tag like :alpine can lead to unexpected build breaks
when nginx releases a new major version. Pinning to the 1.25-alpine
series ensures consistent, reproducible builds while still receiving
patch updates.
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lightning-decoder Ready Ready Preview, Comment Jun 26, 2026 10:03pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 66524d9e3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Dockerfile

# Production stage
FROM nginx:alpine
FROM nginx:1.25-alpine

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a supported nginx base image

For Docker deployments built after this change, the production stage is pinned to nginx 1.25.x; that line's security support ended on May 29, 2024 and its latest release was 1.25.5 on Apr 16, 2024, while the previous nginx:alpine tag tracks a supported official image. This turns rebuilds into stale web-server images that no longer pick up nginx security fixes, so pin to a currently supported series or digest instead.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant