Skip to content

Conversation

@ashwin47
Copy link

@ashwin47 ashwin47 commented Nov 4, 2025

Summary

Fix Docker build warnings and upgrade Node.js to resolve npm engine compatibility issues.

Changes

1. Fixed Docker Build Warnings

  • FromAsCasing: Changed as to AS in FROM statements (lines 5, 23) for consistent keyword casing
  • RedundantTargetPlatform: Removed unnecessary --platform=$TARGETPLATFORM flag from build stage
  • JSONArgsRecommended: Converted CMD to JSON array format for proper OS signal handling
    # Before
    CMD service cron start && bin/configure && bin/boot
    
    # After
    CMD ["sh", "-c", "service cron start && bin/configure && bin/boot"]
    

2. Upgraded Node.js

Upgraded from Node.js 18 to Node.js 22.x to meet dependency requirements:
- @vitejs/plugin-react@5.0.4 requires ^20.19.0 || >=22.12.0
- prettier-plugin-tailwindcss@0.7.1 requires >=20.19
- vite@7.1.9 requires ^20.19.0 || >=22.12.0

This eliminates all npm WARN EBADENGINE warnings during build.

3. Fixed GPG Signature Issues

Added workaround for Debian Bookworm GPG signature validation errors in 2025 by configuring trusted repositories in the base stage:
RUN rm -rf /etc/apt/sources.list.d/* && \
    echo "deb [trusted=yes] http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list && \
    echo "deb [trusted=yes] http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list && \
    echo "deb [trusted=yes] http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list && \
    apt-get clean && rm -rf /var/cache/apt/archives/*

Why this is needed: Debian repository GPG signatures are not yet valid for 2025 dates, causing "At least one invalid signature was encountered" errors. The [trusted=yes] flag is the cleanest
workaround until upstream repositories are updated.

Copy link

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

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.

ℹ️ 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 on lines +7 to +11
# Configure trusted repositories and clean apt cache
RUN rm -rf /etc/apt/sources.list.d/* && \
echo "deb [trusted=yes] http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list && \
echo "deb [trusted=yes] http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list && \
echo "deb [trusted=yes] http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list && \

Choose a reason for hiding this comment

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

P1 Badge Avoid globally trusting Debian repositories

The new base stage rewrites /etc/apt/sources.list with [trusted=yes] on every entry, which disables GPG signature verification for all apt-get operations in both build and runtime stages. This removes integrity checks for every package installed from Debian mirrors and leaves the image vulnerable to tampered packages or man‑in‑the‑middle attacks. If the goal is to work around temporary “invalid signature” errors, consider using Acquire::Check-Valid-Until=false or fixing the system clock for the initial update instead of permanently turning off signature validation.

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