Use a dedicated Node build stage so Dependabot can manage Node version via Docker updates - #409
Merged
Merged
Conversation
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot
AI
changed the title
Use dedicated Node build stage in Dockerfile
Use a dedicated Node build stage so Dependabot can manage Node version via Docker updates
Aug 12, 2026
Copilot created this pull request from a session on behalf of
BenjaminMichaelis
August 12, 2026 16:16
View session
Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
# Conflicts: # Dockerfile Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the Docker build to compile frontend JS/CSS assets in a dedicated Node-based stage, so the Node runtime version is managed via the Docker FROM node:... reference (enabling Dependabot Docker ecosystem updates) while keeping the .NET SDK stage focused on restore/publish.
Changes:
- Added a new
node-buildstage based on a Node image to run/App/build-js.sh. - Removed in-stage Node/npm installation from the .NET SDK build stage.
- Copied generated frontend artifacts from the Node stage into
src/Microsoft.TryDotNet/wwwroot/{api,css}beforedotnet publish.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| @@ -1,15 +1,18 @@ | |||
| # syntax=docker/dockerfile:1 | |||
| FROM node:24-bookworm-slim AS node-build | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change moves JS/CSS artifact compilation to a dedicated
nodestage so the Node runtime version is owned by the DockerFROM node:...reference. This makes Node version updates explicit and automatable through Dependabot’s Docker ecosystem updates.Docker build topology
node-buildstage based onnode:20-bookworm-slim.build-js.shin that stage to produce frontend artifacts..NET build stage simplification
Artifact handoff between stages
node-buildintosrc/Microsoft.TryDotNet/wwwroot/...beforedotnet publish.