Dev Container Config Generator
Build a schema-shaped devcontainer.json from images, features, extensions, ports and lifecycle hooks.
Container setup
0 features · 0 extensionsBase
devcontainer.json
JSONC with explanationsExamples
TypeScript Node
image: typescript-node · ESLint + Prettier · npm installdevcontainer.json with extensions, forwardPorts: [3000] and postCreateCommandThe default stack preset produces a working Node dev container in one click.
Dockerfile build
build.dockerfile: Dockerfile · context: .. · args: NODE_ENV=devbuild block with args instead of an image keyBuild mode wraps a custom image with editor configuration and features.
Feature refs
docker-in-docker + git, version 1ghcr.io/devcontainers/features/docker-in-docker:1 with { version: 1 }Current OCI syntax replaces the deprecated legacy feature URL form.
About this tool
The Dev Container Config Generator builds a valid .devcontainer/devcontainer.json from a guided form. Start from a prebuilt image or a Dockerfile, add pinned Dev Container features, choose editor extensions, forward ports and describe lifecycle commands — the output is a correctly ordered config you can copy into your repository.
Every section has an explanation attached. Features use the current OCI registry references with major-version pins; extensions are linted against the publisher.name shape; port numbers are checked against 1–65535. The one-of image/build rule is enforced so the generated file matches the schema.
Choose JSONC to see comments that explain each section, or strict JSON for schema validators and CI. Lifecycle hooks are documented inline: initializeCommand runs on the host before create, postCreateCommand runs once after creation, postStartCommand on every start and postAttachCommand on every editor attach.
What this tool does not do
- Lifecycle commands are emitted as text; the tool never executes them. Review any imported config before opening it in an editor.
- Feature options are linted against a bundled catalog of common features; new feature schemas may need manual review.
- Docker Compose support covers the file/service/workspaceFolder references only — it does not author compose services.
How to use this tool
Pick a base
Select image, build or compose mode; choose a prebuilt stack image or point at a Dockerfile with its context and args.
Add features and extensions
Tick features from the catalog (pinned to :1) and paste or pick extension IDs such as dbaeumer.vscode-eslint.
Configure ports and hooks
List forwarded ports and add lifecycle commands; each hook shows when it runs next to its input.
Copy the config
Switch between commented JSONC and strict JSON, check the validation badge, then copy or download into .devcontainer/devcontainer.json.
Use cases
Team onboarding
Standardise the container image, extensions and lifecycle commands every contributor gets on first open.
OSS contributions
Add a devcontainer for contributors without hand-writing schema-sensitive JSON.
Codespaces customization
Use the same config for local Dev Containers and GitHub Codespaces, with port attributes and settings.
Output key order
| Key | Meaning |
|---|---|
| name | Friendly name in the Dev Containers UI |
| image | build | Mutually exclusive base: prebuilt image or Dockerfile build block |
| features | OCI feature refs with version options |
| customizations.vscode | Extensions and editor settings |
| forwardPorts / portsAttributes | Forwarded ports and per-port labels |
| containerEnv / remoteUser | Environment and runtime user |
| initializeCommand … postAttachCommand | Lifecycle hooks in execution order |
JSONC and strict JSON are derived from the same object, so the models are always identical after comments are stripped.
Common mistakes
Mistake:Setting both image and build.
Fix:The devcontainer schema treats them as mutually exclusive — the generator enforces one-of and shows an error when both are present.
Mistake:Pinning a feature to :latest.
Fix:Prefer a major-version pin like :1 so feature option schemas stay stable; the tool warns about :latest.
Mistake:Expecting lifecycle commands to run in order listed.
Fix:initializeCommand runs on the host before create, then postCreate, postStart and postAttach run in the container at their respective stages — the hints next to each field explain this.
Frequently asked questions
Image or Dockerfile — which should I use?
Use an image when a prebuilt dev container image already matches your stack (for example mcr.microsoft.com/devcontainers/typescript-node) — it is faster and less to maintain. Use a build block when you need a custom Dockerfile with extra packages or build args. The two keys are mutually exclusive in devcontainer.json, and the generator enforces that rule.
What are dev container features?
Features are self-contained install scripts referenced by OCI URLs such as ghcr.io/devcontainers/features/docker-in-docker:1. They add tools to a running dev container without you authoring a Dockerfile. The generator's catalog includes Git, Node, Python, Java, Go, Terraform, common-utils and both Docker variants, with major-version pins and documented option keys.
When does postCreateCommand run?
postCreateCommand runs once, inside the container, right after it is first created — the usual place for npm install or pip install. postStartCommand runs each time the container starts, postAttachCommand each time an editor attaches, and initializeCommand runs on the host before the container is created. The hints beside each field repeat this sequence.
How do I forward ports?
Enter the port numbers in the Forward ports field, separated by commas or spaces — for example 3000, 5432. They are emitted as a forwardPorts array. Per-port labels go into portsAttributes and defaults into otherPortsAttributes. Numbers outside 1–65535 are rejected with an inline error.
Can I use docker-compose inside a dev container?
Yes — switch to compose mode and the generator emits dockerComposeFile, service and workspaceFolder instead of image/build. It references an existing compose file; it does not author compose services for you. Feature and extension configuration still applies on top.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.