replace corepack-based pnpm setup with global npm install to avoid per-user cache issues for the non-root runtime user. add -m flag and explicit home directory to the useradd command to ensure proper cache directory access, and update health check comments with additional context.
sets up production-grade multi-stage Docker build for the Next.js app, and configures .dockerignore to exclude dev artifacts, logs, env files, and unnecessary assets from the build context.