-
Couldn't load subscription status.
- Fork 182
chore: ensure consistency in environment variable declarations in frontend dockerfile #1216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: ensure consistency in environment variable declarations in frontend dockerfile #1216
Conversation
WalkthroughThe update to the Changes
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
frontend/Dockerfile (3)
50-53: Avoid re-copying manifest files; reuse thedepslayer insteadThe same
COPY frontend/package*.jsonandCOPY widget/package*.jsoninstructions already ran in thedepsstage.
Duplicating them here increases build time and invalidates Docker’s cache whenever those manifests change, even though you could simply copy them from thedepsimage:-COPY frontend/package*.json ./frontend/ -COPY widget/package*.json ./widget/ +COPY --from=deps /app/frontend/package*.json ./frontend/ +COPY --from=deps /app/widget/package*.json ./widget/Nice-to-have, but it keeps the development image leaner and the cache healthier.
61-61: Typos in commentMinor spelling/grammar nit:
-# used to by pass Next.js paching lock file +# Used to bypass Next.js package-lock mismatch warnings
62-62: Collapse consecutiveENVinstructions to a single layerEach
ENVline creates a new layer. You can shave ~3 layers off the final image by grouping related vars:-ENV NEXT_IGNORE_INCORRECT_LOCKFILE=true -ENV NODE_ENV=development -ENV CHOKIDAR_USEPOLLING=true -ENV WATCHPACK_POLLING=true +ENV NEXT_IGNORE_INCORRECT_LOCKFILE=true \ + NODE_ENV=development \ + CHOKIDAR_USEPOLLING=true \ + WATCHPACK_POLLING=true…and likewise for the production stage (
NEXT_IGNORE_INCORRECT_LOCKFILE,NEXT_TELEMETRY_DISABLED,PORT).Also applies to: 76-76, 79-79, 99-99
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
frontend/Dockerfile(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: API-Tests
- GitHub Check: Frontend Tests
- GitHub Check: Analyze (actions)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
frontend/Dockerfile (1)
62-62: ENV syntax looks goodSwitching to the
KEY=valueform eliminates the build-time warning and matches Docker’s recommended style.
Motivation
This PR updates the syntax for setting environment variables in the frontend/Dockerfile from
ENV VAR valuetoENV VAR=value. This change eliminates build-time warnings that appear with the old syntax and aligns the Dockerfile with best practices and the official Docker documentation. No functional changes are introduced.Type of change:
Please delete options that are not relevant.
Checklist: