Skip to main content
InfraGap.com Logo
Home
Getting Started
Core Concept What is a CDE? How It Works Benefits CDE Assessment Getting Started Guide
Implementation
Architecture Patterns DevContainers Language Quickstarts IDE Integration AI/ML Workloads Advanced DevContainers
Operations
Performance Optimization High Availability & DR Monitoring Capacity Planning Troubleshooting Runbooks
Security
Security Deep Dive Secrets Management Vulnerability Management Network Security IAM Guide Compliance Guide
Planning
Pilot Program Design Stakeholder Communication Risk Management Migration Guide Cost Analysis Vendor Evaluation Training Resources Team Structure Industry Guides
Resources
Tools Comparison CDE vs Alternatives Case Studies Lessons Learned Glossary FAQ

Language-Specific Quickstarts

Ready-to-use DevContainer configurations for every major programming language. Copy these production-ready devcontainer.json templates into your projects and start developing in the cloud instantly

How to Use These Quickstarts

1

Create the .devcontainer directory

In your project root, create a .devcontainer folder.

2

Copy the configuration

Choose your language below and copy the devcontainer.json file into .devcontainer/devcontainer.json.

3

Open in your CDE

Use VS Code Remote Containers, GitHub Codespaces, Gitpod, Coder, or any DevContainer-compatible platform. The environment will build automatically.

4

Customize as needed

Modify the configuration to add project-specific tools, extensions, or environment variables.

Node.js / JavaScript / TypeScript

Production-ready Node.js environment with TypeScript support, ESLint, Prettier, and debugging configured.

.devcontainer/devcontainer.json
.vscode/launch.json (Debugging)
Common Issues and Fixes
ESLint not working: Run npm install eslint --save-dev and create .eslintrc.json
Node version mismatch: Change the version in features to match your project (16, 18, 20, 22)
Slow container builds: Use "postCreateCommand": "npm ci" instead of npm install for faster installs

Python

Python 3.11+ with Poetry, pip, virtual environments, Jupyter, and comprehensive debugging support.

.devcontainer/devcontainer.json
.vscode/launch.json (Debugging)
Poetry Support

For Poetry-based projects, add this feature and change the postCreateCommand:

"features": {
  "ghcr.io/devcontainers/features/python:1": {
    "version": "3.11"
  },
  "ghcr.io/eitsupi/devcontainer-features/poetry:1": {
    "version": "latest"
  }
},
"postCreateCommand": "poetry install"
Common Issues and Fixes
Module not found errors: Ensure virtual environment is activated: source .venv/bin/activate
Jupyter not starting: Change installJupyterlab to true in features
Wrong Python version: Update the version in features (3.9, 3.10, 3.11, 3.12)

Java / Kotlin

JDK 17/21 with Maven, Gradle, Spring Boot support, and comprehensive Java tooling.

.devcontainer/devcontainer.json
.vscode/launch.json (Debugging)
Common Issues and Fixes
Maven wrapper not executable: Run chmod +x mvnw
JDK version mismatch: Change version to match your project (11, 17, 21)
Lombok not working: Ensure gabrielbb.vscode-lombok extension is installed and reload window

Go

Go 1.21+ with module support, debugging, linting, and testing configured.

.devcontainer/devcontainer.json
.vscode/launch.json (Debugging)
Common Issues and Fixes
gopls not found: Run go install golang.org/x/tools/gopls@latest
Module errors: Ensure go.mod exists in project root, create with go mod init
Linting not working: Install golangci-lint: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

Rust

Latest Rust toolchain with rust-analyzer, Cargo, clippy, and CodeLLDB debugging.

.devcontainer/devcontainer.json
.vscode/launch.json (Debugging)
Common Issues and Fixes
rust-analyzer slow: Disable cargo.allFeatures for large projects
Debugging not working: Ensure CodeLLDB extension is installed and workspace has Cargo.toml
Build cache issues: Run cargo clean to clear build artifacts

.NET / C#

.NET 8 SDK with C# Dev Kit, NuGet, and comprehensive debugging support.

.devcontainer/devcontainer.json
.vscode/launch.json (Debugging)
Common Issues and Fixes
OmniSharp not loading: Reload window or restart C# extension
NuGet restore fails: Run dotnet restore --force
Wrong .NET version: Update version to match your project (6.0, 7.0, 8.0)

Full-Stack Examples

Multi-container configurations for full-stack development with databases and services

React + Node.js + PostgreSQL

.devcontainer/devcontainer.json
.devcontainer/docker-compose.yml

Django + PostgreSQL

.devcontainer/devcontainer.json
.devcontainer/docker-compose.yml

Spring Boot + MySQL

.devcontainer/devcontainer.json
.devcontainer/docker-compose.yml

Performance Tips

Optimize your DevContainers for faster builds and better developer experience

Layer Caching

Use pre-built base images and avoid reinstalling dependencies on every rebuild

// Use official images
"image": "mcr.microsoft.com/..."

// Cache dependencies
"mounts": [
  "source=node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume"
]

Volume Mounts

Use cached volumes for node_modules, .venv, and build artifacts

"mounts": [
  "source=${localWorkspaceFolderBasename}-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume"
]

Prebuild Images

For GitHub Codespaces and Gitpod, use prebuilds to speed up workspace creation

// GitHub Codespaces
{
  "prebuildOptions": {
    "commands": ["npm ci", "npm run build"]
  }
}

Selective Extensions

Only install essential extensions to reduce startup time

// Install only what you need
"extensions": [
  "dbaeumer.vscode-eslint",
  "esbenp.prettier-vscode"
  // Skip theme extensions in CDEs
]

Additional Optimization Strategies

Use npm ci instead of npm install

Faster, deterministic installs from package-lock.json

Configure postAttachCommand

Run lightweight startup tasks after container is ready

Minimize Dockerfile layers

Combine RUN commands to reduce image size and build time

Use multi-stage builds

Separate build and runtime environments for smaller images

Ready to start developing in the cloud?

Copy these configurations, customize for your project, and experience the power of standardized development environments.