Using Development Containers
Introduction
This documentation guides you through using Development Containers to create and manage consistent development environments across projects.
|
New to Development Containers? Start with our Setup Guide to get your environment configured. |
Benefits
-
Start any project in seconds with a consistent environment
-
Work with identical tooling and settings across all projects
-
Eliminate "works on my machine" issues and enforces CI/CD parity
-
Reduce local machine resource usage through containerization
-
Focus on development instead of environment setup
Architecture Overview
Development Container Architecture
The development container uses a headless IDE architecture that separates concerns:
-
IDE backend runs in the container
-
Frontend UI runs locally via JetBrains Gateway
-
All development tools located within the container
-
Lower resource usage on local machine
Kubernetes Architecture
Our local k8s stack uses Kind (Kubernetes IN Docker):
-
Provides isolated Docker environment
-
Enables reliable container builds
-
Maintains state between sessions
-
Runs Kubernetes nodes as containers inside DinD
-
Direct "containers all the way down" approach:
-
Devcontainer → DinD → Kind containers (running k8s)
-
-
More efficient than Minikube’s additional VM layer:
-
Devcontainer → DinD → Minikube VM → k8s containers
-
State Management
Volume Architecture
Our environment uses an efficient volume management system:
Infrastructure Volumes
dind-${projectName})-
Volume mount for Docker daemon state
-
Includes Kind cluster configuration
-
-
Can be safely reset without affecting development
-
docker volume remove dind-${projectName}
-
Development Volumes
-
Bind mount from local .m2 directory
-
Prevents redundant downloads
-
Improves build times significantly
intellij-config)-
Volume mount for IDE settings:
-
IDE preferences, Keymaps, Plugin configurations, Code style settings, Live templates
-
State Persistence Behavior
-
Volume contents persist between container restarts:
-
Development volumes (Maven, IDE settings) are shared across all projects
-
Infrastructure volume (Docker, k8s state) is unique per project
-
-
Volumes can be managed independently:
-
Development volumes maintain consistent experience
-
Infrastructure can be reset without affecting development setup
-
Advanced Configuration
Following Development Containers Specification you can make changes to configurations including, but not limited to:
-
Container memory limits
-
CPU allocation
-
Disk space management
-
Port forwarding
-
Host network access
-
Container networking
TODO’s & Enhancements
-
Cover git operations
-
Detailed guide for using iTerm (terminal access) to run commands against Devcontainer service
-
Move containerEnv to .zsh_devcontainer mount (update credentials doc)
-
Better guide/explanation of using forwardPorts
-
Postman host connection to container
-
Explanation of KinD
-
Volume and container management 'policies' or best practices
-
Dev vs Infrastructure volume explanation