feat: bundle devcontainer CLI in UDI - #267
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: rohanKanojia The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe UBI9 and UBI10 Dockerfiles install ChangesDev Containers CLI installation
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The UBI9 and UBI10 images now bundle the pinned Dev Containers CLI and avoid runtime installation dependencies. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
Adds @devcontainers/cli@0.88.0 to both ubi9 and ubi10 universal images, eliminating the runtime npm install on every workspace start for devcontainer setup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Rohan Kumar <rohaan@redhat.com>
fbf069b to
a3f8d59
Compare
Summary
Related to eclipse-che/che#23458
@devcontainers/cli@0.88.0to bothuniversal/ubi9/Dockerfileanduniversal/ubi10/Dockerfilenpm install -g @devcontainers/cli(+curl | shfallback) from every workspace startWhy
Today the CLI is installed on every workspace start via
npm install -g @devcontainers/cli. This costs start-up time and makes the flow depend on npm/GitHub reachability — a blocker in airgapped clusters. The install does not survive a pod restart becausenpm install -gunder nvm lands in an image layer that gets replaced bystow.What
Pinned
@devcontainers/cli@0.88.0, installed the same way as yarn (npm install --globalunder nvm), in both ubi9 and ubi10 Dockerfiles. Follows the existing pattern exactly:source /home/user/.bashrc— loads nvm sonpmresolvesENV DEVCONTAINER_CLI_VERSIONfor reproducible builds and CVE trackingchgrp -R 0 /home/tooling && chmod -R g=u /home/tooling— required for arbitrary UID (OpenShift)/home/tooling(not/home/user, which is replaced by PVC withpersistUserHome)No redundant
PATHentry — the existingENV PATH=$NVM_DIR/versions/node/v${NODEJS_DEFAULT_VERSION}/bin:$PATHalready covers the global npm bin directory.Licence
LICENSE.txt, Copyright Microsoft Corporation)"dependencies": {}— pre-bundled webpack artifact, single file atdist/spec-node/devContainersSpecCLI.jsLICENSE.txtandThirdPartyNotices.txtship in the npm package directoryArchitecture
No native modules — the package is arch-independent (amd64/arm64/ppc64le all unaffected).
Maintenance
Updates come from bumping the pinned
DEVCONTAINER_CLI_VERSIONenv var.Context
Related: eclipse-che/che#23458
🤖 Generated with Claude Code
Summary by CodeRabbit