This repository provides a lean development container template for GitHub Codespaces and local VS Code Dev Containers.
- Ubuntu 24.04 base image
- Single-image devcontainer build based on
.devcontainer/Dockerfile - Core tooling for general development work:
- Python 3 with
venvandpip - Node.js LTS with
npm - GitHub CLI
- OpenCode TUI installed via
updateContentCommand(cached by prebuilds) - Bash shell with common utilities
- Build essentials (
gcc,make, and related packages) via base image
- Python 3 with
- VS Code extensions:
- Python and Pylance
- GitHub Copilot and Copilot Chat
- YAML
The devcontainer is tuned for fast Codespaces startup:
- Minimal feature set: only
common-utils,node, andgithub-clifeatures are installed — Docker-in-Docker, sshd, and git features are omitted common-utilsconfigured with zsh and Oh My Zsh disabled- No full package upgrades during image build
curl,wget,jq, andgitsourced from the base image andcommon-utilsfeature — not re-installed in the Dockerfile- OpenCode TUI installed in
updateContentCommandinstead ofpostCreateCommand, so it is cached during Codespaces prebuilds and not re-run on every start - Small, targeted extension set
Estimated startup time: 45–75 seconds without prebuilds, 10–25 seconds with prebuilds enabled (see below).
Codespaces prebuilds cache the fully built container image, installed features,
and updateContentCommand output on GitHub's infrastructure. This is the
single biggest lever for fast cold-starts.
- Navigate to the repository on GitHub.
- Go to Settings → Codespaces.
- Click Set up prebuild configuration.
- Select the
mainbranch and choose one or more regions closest to your team. - Set the trigger to "On every push" (or "On configuration change" for less frequent rebuilds).
- Save.
The first prebuild takes roughly 3–5 minutes. After that, every new Codespace
created from main will start in approximately 10–25 seconds.
Tip: Prebuilds are available on GitHub Team and Enterprise plans, and are free for public repositories up to a certain storage quota.
- Click "Code" button on the GitHub repository
- Select "Create codespace on main"
- Wait for the environment to build
- Clone this repository
- Open in VS Code
- Click "Reopen in Container" when prompted
.devcontainer/devcontainer.json: main devcontainer definition, features, VS Code extensions, and lifecycle commands.devcontainer/Dockerfile: minimal image customization for Python packages.github/workflows/ci.yml: CI checks for Dockerfile linting, secret scanning, image build, and devcontainer smoke testing
Click "Use this template" button to create a new repository
cp -r .devcontainer /path/to/your/project/Edit .devcontainer/devcontainer.json to add features or tools:
{
"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "17"
}
}
}To add Docker support when you need it:
{
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
}
}If you add new features or packages, keep the CI workflow in sync with any new tooling expectations you want validated during the container smoke test.
This project is licensed under the MIT License - see the LICENSE file for details.