Skip to content

fix(docker): enhance security and address themeColor warning#115

Merged
priyankarpal merged 1 commit into
reactplay:mainfrom
mdnm18:fix/109-docker-security
Oct 30, 2025
Merged

fix(docker): enhance security and address themeColor warning#115
priyankarpal merged 1 commit into
reactplay:mainfrom
mdnm18:fix/109-docker-security

Conversation

@mdnm18
Copy link
Copy Markdown
Contributor

@mdnm18 mdnm18 commented Oct 29, 2025

Resolves #109. Updates Dockerfile Node version and adds apk upgrade per admin feedback. Moves themeColor metadata to viewport export.

Summary

This PR addresses Issue #109 by implementing Docker security improvements based on admin feedback and resolving the console warning related to themeColor metadata configuration.

Changes

  • Dockerfile:
    • Updated the Node.js base image to a specific patched version (node:20.18.0-alpine3.20) for improved security.
    • Added RUN apk update && apk upgrade --no-cache at the beginning of both the build and production stages to ensure OS packages are up-to-date.
  • src/modules/home/meta/site.ts:
    • Removed the themeColor property from the siteConfig metadata object.
  • src/app/[locale]/layout.tsx:
    • Imported the Viewport type from next.
    • Added a new viewport export containing the themeColor configuration, following current Next.js best practices.

Testing

I tested these changes locally by:

  1. Running pnpm run dev and confirming the themeColor warning no longer appears in the browser console.
  2. Running docker-compose up --build and verifying:
    • The Docker image built successfully using the updated Dockerfile.
    • The application started correctly and was accessible at http://localhost:3000.
  3. Checked Docker Desktop's security scan on the new image to confirm the build.

Related Issue

Resolves #109

Notes

  • This PR focuses specifically on the Docker security updates requested and fixing the themeColor warning.
  • The separate console warnings related to next/image missing sizes props and the React hydration error (#418) are outside the scope of this PR and should be addressed in dedicated issues.
  • Further Docker vulnerability reduction beyond updating the base image and OS packages could be explored in a future issue if needed.

Resolves reactplay#109. Updates Dockerfile Node version and adds apk upgrade per admin feedback. Moves themeColor metadata to viewport export.
@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 29, 2025

Deploy Preview for reactkolkata ready!

Name Link
🔨 Latest commit ad68647
🔍 Latest deploy log https://app.netlify.com/projects/reactkolkata/deploys/690256c0a1cc330008de8bb5
😎 Deploy Preview https://deploy-preview-115--reactkolkata.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mdnm18
Copy link
Copy Markdown
Contributor Author

mdnm18 commented Oct 29, 2025

Hi @priyankarpal,

I've submitted this PR to address Issue #109.

It includes the Docker security improvements we discussed (updated Node.js version in Dockerfile and added apk upgrade) and also fixes the themeColor console warning by moving it to the viewport export.

I've tested the Docker build and the dev server locally, and everything seems to be working correctly regarding these specific fixes.

Regarding other console messages:
Just wanted to note that this PR does not address the warnings related to next/image missing the sizes prop or the React hydration error (#418) seen in the browser console. As discussed, these seem unrelated to the Docker/themeColor issues and would be best handled in separate, dedicated issues/PRs to keep this one focused.

Please let me know if any further changes are needed for this PR!

@priyankarpal priyankarpal merged commit f0dee38 into reactplay:main Oct 30, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Docker Image Security and Update Node Version

2 participants