Eliminating 'Works on My Machine' with devcontainer.json
Stop wasting onboarding time on local setup. Learn how to use devcontainer.json in GitHub Codespaces to standardize runtimes, tools, and editor extensions for your entire team.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop wasting onboarding time on local setup. Learn how to use devcontainer.json in GitHub Codespaces to standardize runtimes, tools, and editor extensions for your entire team.
Use postStartCommand in devcontainer.json to automate setup in GitHub Codespaces, with example, limits, and verification steps.
Codespaces prebuilds cache your devcontainer environment ahead of time, turning multi-minute startups into seconds. Here's how they work, how to configure them for a Node.js monorepo, and the storage trade-off to watch.
Treat devcontainer.json as the versioned source of truth for a Codespace: pin the image, split lifecycle commands, respect storage and trust boundaries, and verify against creation logs.
A Codespaces rebuild wipes part of your environment and preserves the rest. Learn which files survive, how to keep databases alive across rebuilds, and how to audit storage costs.
Learn how to cut GitHub Codespaces startup time from minutes to seconds by configuring prebuilds that cache devcontainer images. Follow our step‑by‑step guide, validation checks, and rollback options.
Learn how GitHub Codespaces’ forwardPorts feature lets you expose any TCP service from a devcontainer with a public URL, preserving hot‑reload and requiring no extra configuration.
Learn to tailor GitHub Codespaces with a devcontainer.json that references a Dockerfile, installs VS Code extensions, sets environment variables, and forwards ports. Includes a complete Node.js example, verification steps, and common pitfalls.
Learn how to pin a base image, add features, run lifecycle scripts, and forward ports in a devcontainer.json so every Codespace starts with identical tooling and is ready to code.