Centralized, composable Dev Container configurations and tooling.
Source files in src/ are layered via extends and merged into ready‑to‑install single files in populated/.
Install a configuration into any repo with a one‑liner (see Install), and keep it up‑to‑date with a simple sync script (see containersync).
Why this is useful:
- Consistent, reproducible environments across many projects and languages
- Composable building blocks (
customization.*,feature.*,image.*,mount.*) with deep merge - Opinionated VS Code settings and post-create automation baked in
- One‑line install (no git history) via
degitinto.devcontainer/devcontainer.json - Easy updates: generated files carry a
customizations.pmalacho-mit/devcontainers.refyou can resync withcontainersync
Copy the appropriate command below into your project repository root to install a devcontainer configuration.
Each command uses the degit utility (from suede)
to fetch the .devcontainer/devcontainer.json file from a specific branch
of the pmalacho-mit/devcontainers repository.
The command structure:
bash <(curl https://suede.sh/utils/degit)— Downloads and executes the degit utility--destination .— Extracts files to the current directory--repo pmalacho-mit/devcontainers— Specifies the source repository--branch <branch-name>— Specifies which devcontainer configuration branch to use--force— Overwrites existing.devcontainer/devcontainer.jsonif present
bash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch common --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch docker-outside-of-docker --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch node-default --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch poetry-default --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch python-default --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch svelte-default --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch svelte-docker-default --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch svelte-tailwind-default --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch typescript-default --forcebash <(curl https://suede.sh/utils/degit) --destination . --repo pmalacho-mit/devcontainers --branch typescript-docker-default --forceComplete, composable devcontainer configurations that extend other files using the extends field.
Base configuration shared by all devcontainers. Includes common features, customizations, mounts, and post-create commands.
{
"extends": [
"./image.ubuntu-24.json",
"./feature.git-subrepo.json",
"./feature.vim.json",
"./customization.tab-size-2.json",
"./customization.format-on-save.json",
"./customization.markdown.json",
"./mount.ssh.json",
"./opencode/initializeCommand.json",
"./opencode/mount.json",
"./opencode/postCreateCommand.json",
"./postCreateCommand.ignore-UseKeychain-in-ssh-config.json",
"./postCreateCommand.git-config-vim-as-core-editor.json",
"./postCreateCommand.git-config-merge-divergent.json",
"./postCreateCommand.codeblockify.json",
"./postCreateCommand.containersync.json",
"./difftastic/postCreateCommand.json"
]
}Node.js-focused devcontainer with common Node setup.
{
"extends": [
"./devcontainer.common.json",
"./feature.node-20.json"
]
}Python-focused devcontainer with Python 3.12 and common Python tools.
{
"extends": [
"./devcontainer.common.json",
"./feature.python-3.12.json",
"./customization.python.json"
]
}TypeScript/Node.js devcontainer with TypeScript compiler and Node.js 20.
{
"extends": [
"./devcontainer.node-default.json",
"./customization.typescript.json"
]
}
Svelte-focused devcontainer with Svelte customizations and Node.js 20.
{
"extends": [
"./devcontainer.typescript-default.json",
"./customization.svelte.json"
]
}Svelte with Tailwind CSS devcontainer, combining Svelte and Tailwind configurations.
{
"extends": [
"./devcontainer.svelte-default.json",
"./customization.tailwindcss.json"
]
}Python devcontainer with Poetry dependency management.
{
"extends": [
"./devcontainer.python-default.json",
"./customization.python-venv.json",
"./feature.poetry.json"
]
}Devcontainer configured to run Docker commands from within the container.
{
"extends": [
"./devcontainer.common.json",
"./docker-outside-of-docker"
]
}VS Code editor customizations including settings, keybindings, and extensions.
Enables automatic code formatting when saving files.
{
"customizations": {
"vscode": {
"settings": {
"editor.formatOnSave": true
}
}
}
}VS Code customizations specific to Markdown editing.
{
"customizations": {
"vscode": {
"settings": {
"[markdown]": {
"editor.defaultFormatter": null
}
}
}
}
}Extensions and settings for Mermaid diagram support in VS Code.
{
"customizations": {
"vscode": {
"extensions": [
"bierner.markdown-mermaid"
]
}
}
}Python-specific VS Code customizations including linting and formatting tools.
{
"customizations": {
"vscode": {
"settings": {
"python.analysis.typeCheckingMode": "standard",
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--line-length=88"
],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
},
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter"
]
}
}
}Configures Python virtual environment detection and activation in VS Code.
{
"customizations": {
"vscode": {
"settings": {
"python.venvPath": "${containerWorkspaceFolder}/.venv",
"python.defaultInterpreterPath": "${containerWorkspaceFolder}/.venv/bin/python",
"python.terminal.activateEnvInCurrentTerminal": true
}
}
}
}Svelte language support and formatting customizations for VS Code.
{
"customizations": {
"vscode": {
"settings": {
"svelte.enable-ts-plugin": true,
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
}
},
"extensions": [
"svelte.svelte-vscode"
]
}
}
}
Sets default editor tab size to 2 spaces.
{
"customizations": {
"vscode": {
"settings": {
"editor.tabSize": 2
}
}
}
}Tailwind CSS IntelliSense and linting for VS Code.
{
"customizations": {
"vscode": {
"extensions": [
"bradlc.vscode-tailwindcss"
],
"files.associations": {
"*.css": "tailwindcss"
}
}
}
}
TypeScript-specific VS Code customizations including formatting and linting.
{
"customizations": {
"vscode": {
"settings": {
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"extensions": [
"ms-vscode.vscode-typescript-next",
"esbenp.prettier-vscode"
]
}
}
}
Devcontainer Features that install tools and runtimes into the container.
Installs git-subrepo for managing git subrepositories.
{
"features": {
"ghcr.io/pmalacho-mit/devcontainer-features/git-subrepo:latest": {}
}
}Installs Node.js 20.x runtime.
{
"features": {
"ghcr.io/devcontainers/features/node:latest": {
"version": "20"
}
}
}Installs Poetry dependency manager for Python projects.
{
"features": {
"ghcr.io/devcontainers-extra/features/poetry:latest": {
"version": "latest"
}
},
"remoteEnv": {
"POETRY_VIRTUALENVS_IN_PROJECT": "true"
}
}Installs PostgreSQL database server.
{
"features": {
"ghcr.io/robbert229/devcontainer-features/postgresql-client:latest": {}
}
}Installs Python 3.12 runtime.
{
"features": {
"ghcr.io/devcontainers/features/python:latest": {
"version": "3.12"
}
}
}Installs Vim editor.
{
"features": {
"ghcr.io/guiyomh/features/vim:0": {}
}
}Base container images for devcontainers.
Ubuntu 24.04 LTS base image.
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04"
}Volume mounts that bind local directories into the container.
Mounts the local SSH config and keys into the container for Git operations and remote access.
Important
If you're using MacOS, ensure to also include postCreateCommand.ignore-UseKeychain-in-ssh-config.json to avoid issues.
{
"mounts": [
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
]
}
Commands executed automatically after the devcontainer is created, used for setup and configuration.
Installs the codeblockify utility for converting files into Markdown code blocks.
{
"postCreateCommand": "sudo curl -fsSL https://gist.githubusercontent.com/pmalacho-mit/d64caa8e16b0b0fdd5e58cc37a0ce242/raw/8f0f620d4a65f6f3d930ea14e7c2fdf382ef1bf1/codeblockify.sh -o /usr/local/bin/codeblockify && sudo chmod +x /usr/local/bin/codeblockify"
}Installs the containersync utility for syncing local devcontainer configs from the remote repository.
To update your .devcontainer/devcontainer.json to the latest version from pmalacho-mit/devcontainers, simply run the following in your devcontainer's terminal (at the root of your project):
containersync{
"postCreateCommand": "sudo curl -fsSL https://raw.githubusercontent.com/pmalacho-mit/devcontainers/main/scripts/sync.sh -o /usr/local/bin/containersync && sudo chmod +x /usr/local/bin/containersync"
}Configures Git to use merge (instead of rebase) when pulling divergent branches.
{
"postCreateCommand": "git config pull.rebase false"
}
Configures Vim as the default Git editor.
{
"postCreateCommand": "git config core.editor '/usr/bin/vim'"
}
Adds IgnoreUnknown UseKeychain to SSH config for compatibility with non-macOS systems.
Used in tandem with mount.ssh.json.
{
"postCreateCommand": "(grep -q 'IgnoreUnknown UseKeychain' ~/.ssh/config 2>/dev/null || sed -i '/UseKeychain/i IgnoreUnknown UseKeychain' ~/.ssh/config 2>/dev/null)"
}