Fix Windows Docker build: add Windows system dirs to the image PATH#15
Fix Windows Docker build: add Windows system dirs to the image PATH#15robobun wants to merge 1 commit into
Conversation
The servercore base image does not define PATH in its image config, so
${PATH} in the ENV instruction expands to an empty string and the
resulting image PATH contains only the PowerShell/Git/chocolatey
directories. Processes in the container then cannot resolve anything in
C:\Windows\System32 (robocopy, tar, wmic, reg).
Since oven-sh/bun#26746 switched scripts/bootstrap.ps1 to Scoop, the
Scoop installer aborts immediately because robocopy is not on PATH, so
no build tools or Visual Studio get installed and the bootstrap stage
fails at the vs_installer.exe step. The daily Windows build has failed
every run since 2026-02-17.
List the Windows system directories explicitly in the ENV PATH so the
bootstrap script can run.
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 36 minutes and 3 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
|
Companion fix on the bun side: oven-sh/bun#31298 makes |
What's broken
The Daily Windows Docker Build workflow has failed on every scheduled run since 2026-02-17 (the last published
-windows:bootstrap-*image on ghcr is from 2026-02-11). Latest failure: https://github.com/oven-sh/bun-development-docker-image/actions/runs/26337614553Every run dies the same way in the bootstrap stage:
Root cause
Dockerfile.windowssetsbut the servercore base image does not define
PATHin its image config (it only exists in the container's registry hive), so${PATH}expands to an empty string, and onceENVsetsPATHit replaces the registry value for every process in the container. The published bootstrap image config confirms it — its entire PATH is:No
C:\Windows\System32, so nothing in the system directories (robocopy, tar, wmic, reg, ...) is resolvable by name.That was harmless while
scripts/bootstrap.ps1was chocolatey-based (choco.exe is on the PATH above). oven-sh/bun#26746 (merged 2026-02-19) rewrote the script to use Scoop, and the Scoop installer aborts immediately whenrobocopycan't be resolved. The bootstrap script therefore installs nothing (theRUNdoesn't propagate pwsh's exit code, so the step "succeeds"), and the build then fails at thevs_installer.exe modifystep because Visual Studio was never installed. The timeline matches: last green run 2026-02-16, 100% failure rate since.Fix
List the Windows system directories explicitly in the
ENV PATHinstead of relying on${PATH}expansion. One line (plus a comment explaining why).Verification
I can't run a Windows container build from here, so the practical check is to trigger Daily Windows Docker Build via
workflow_dispatchonce this is merged (or just wait for the next 16:00 UTC run). With System32 on PATH the Scoop install prerequisite check passes, which is the hard blocker every run has hit for the past three months.Note: the Linux
Daily Docker Build/Daily WebKit Docker Buildworkflows are not affected by this — their occasional red runs (e.g. May 18/22) were runner disk-space flakes ("No space left on device") and recovered on the next run.