Plan: Publish devcontainer-user-template.json as single source of truth
IMPLEMENTATION RULES: Before implementing this plan, read and follow:
- WORKFLOW.md - The implementation process
- PLANS.md - Plan structure and best practices
Status: Active​
Goal: Create devcontainer-user-template.json at the repo root as the single source of truth for image-mode devcontainer configuration, and update all consumers to download from it.
Last Updated: 2026-02-17
Investigation: INVESTIGATE-image-mode-devcontainer-json.md
Priority: High — external deployment scripts (jamf) are downloading the wrong file
Problem​
The image-mode devcontainer.json (for user projects) has no stable URL. It's embedded as duplicated copies inside install.sh and install.ps1. External tools (jamf devcontainer-init) mistakenly download the build-mode .devcontainer/devcontainer.json which fails because it references Dockerfile.base.
See the investigation for full analysis.
Phase 1: Create the template file — ✅ DONE​
Tasks​
- 1.1 Create
devcontainer-user-template.jsonat the repo root ✓ - 1.2 Verify the file is valid JSONC ✓
Validation​
File exists at https://raw.githubusercontent.com/terchris/devcontainer-toolbox/main/devcontainer-user-template.json after push.
Phase 2: Update install.sh — ✅ DONE​
Tasks​
- 2.1 Remove embedded JSON heredoc ✓
- 2.2 Add
TEMPLATE_URLvariable pointing todevcontainer-user-template.json✓ - 2.3 Download the template using
curl(withwgetfallback) ✓ - 2.4 Add file size validation (not empty) ✓
- 2.5 Add
.vscode/extensions.jsoncreation ✓ - 2.6 Handle existing
.vscode/extensions.json(merge via python3, or warn) ✓
Validation​
Run install.sh on Mac/Linux and verify:
.devcontainer/devcontainer.jsoncontains"image":(not"build":).vscode/extensions.jsoncontainsms-vscode-remote.remote-containers- Docker image is pulled
Phase 3: Update install.ps1 — ✅ DONE​
Tasks​
- 3.1 Remove embedded JSON here-string ✓
- 3.2 Add
$templateUrlvariable pointing todevcontainer-user-template.json✓ - 3.3 Download the template using
Invoke-WebRequest✓ - 3.4 Add TLS 1.2 enforcement and file size validation ✓
- 3.5 Add
.vscode/extensions.jsoncreation ✓ - 3.6 Handle existing
.vscode/extensions.json(merge via ConvertFrom-Json) ✓
Validation​
Review that install.ps1 follows the same pattern as jamf devcontainer-init.ps1 for download and validation.
Phase 4: Clean up legacy _toolboxVersion — ✅ DONE​
Tasks​
- 4.1 Remove
"_toolboxVersion": "TOOLBOX_VERSION_PLACEHOLDER"from.devcontainer/devcontainer.json✓ - 4.2 Remove the
sedreplacement in.github/workflows/zip_dev_setup.yml(line 50) ✓ - 4.3 Update
website/docs/contributors/releasing.md— remove_toolboxVersionreference ✓ from files table
Validation​
CI passes without the version placeholder logic.
Phase 5: Document the two deployment modes — ✅ DONE​
Tasks​
- 5.1 Add "Two Deployment Modes" section to
website/docs/contributors/architecture/index.md✓ - 5.2 Add warning comment to
.devcontainer/devcontainer.json✓ - 5.3 Verify
README.mdinstall instructions point toinstall.sh/install.ps1✓ (already correct) - 5.4 Add note in
website/docs/contributors/index.mdQuick Start section ✓
Validation​
User confirms documentation is clear and complete.
Acceptance Criteria​
-
devcontainer-user-template.jsonexists at repo root — the single source of truth -
install.shdownloads fromdevcontainer-user-template.json(no embedded JSON) -
install.ps1downloads fromdevcontainer-user-template.json(no embedded JSON) - Both install scripts create
.vscode/extensions.jsonwith Dev Containers extension - No
initializeCommandin the user template (cross-platform safe) - Legacy
_toolboxVersion/TOOLBOX_VERSION_PLACEHOLDERremoved - Contributor docs explain the two deployment modes
-
.devcontainer/devcontainer.jsonhas warning comment - CI passes
Files to Create​
devcontainer-user-template.json— image-mode template (repo root)
Files to Modify​
install.sh— remove embedded JSON, download template, add.vscode/extensions.jsoninstall.ps1— remove embedded JSON, download template, add.vscode/extensions.json.devcontainer/devcontainer.json— add warning comment, remove_toolboxVersion.github/workflows/zip_dev_setup.yml— remove_toolboxVersionsed replacementwebsite/docs/contributors/releasing.md— remove_toolboxVersionreferencewebsite/docs/contributors/architecture/index.md— add "Two Deployment Modes" sectionwebsite/docs/contributors/index.md— add note about build-mode vs image-mode
External changes needed (jamf project)​
After this plan is merged, the jamf project needs to update the download URL in:
scripts-mac/devcontainer-toolbox/devcontainer-init.shline 38scripts-win/devcontainer-toolbox/devcontainer-init.ps1line 43
See jamf project: INVESTIGATE-devcontainer-json-download-url.md