Using DevContainers in JetBrains IDEs
DevContainers aren't VS Code-only — JetBrains IDEs support the same spec. This page opens a devcontainer from a JetBrains IDE using the identical committed .devcontainer/, so a mixed-editor team shares one environment definition regardless of who uses which IDE.
Prerequisites
You need a JetBrains IDE with Gateway/dev containers support and an engine.
- A recent JetBrains IDE (or JetBrains Gateway).
- A container engine reachable by the IDE.
- A committed
.devcontainer/devcontainer.json.
Step-by-Step Implementation
-
Open the project's devcontainer from the IDE (Remote Development → Dev Containers) using the committed config.
-
Keep the config editor-agnostic — Features and hooks are shared; editor extensions differ.
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu@sha256:PINNED",
"features": { "ghcr.io/devcontainers/features/java:1": { "version": "21" } },
"remoteUser": "vscode"
}
-
Let the IDE run its backend in the container (JetBrains client/backend split, analogous to VS Code).
-
Verify the toolchain resolves inside the container.
Common Pitfalls
JetBrains issues are editor-specific customizations or an unreachable engine. The JetBrains model mirrors VS Code's: a thin host client and a backend running inside the container against the real toolchain, driven by the identical .devcontainer/.
| Symptom | Root Cause | Remediation |
|---|---|---|
| VS Code extensions don't load in JetBrains | customizations.vscode is VS Code-only | Use JetBrains plugins for that IDE |
| IDE can't reach the engine | Backend not configured | Point the IDE at the container engine |
| Toolchain missing | Feature not applied | Confirm the config builds the same Features |
| Config drift between editors | Editor-specific baked into shared parts | Keep base/Features/hooks editor-agnostic |
Conclusion
DevContainers are a spec, not a VS Code feature — JetBrains IDEs consume the same .devcontainer/. Keep the base image, Features, and hooks editor-agnostic, and let each IDE layer its own plugins, so a mixed-editor team shares one reproducible environment.
FAQ
Do devcontainers only work with VS Code?
No. DevContainers are an open spec, and JetBrains IDEs (via Gateway/Remote Development) consume the same .devcontainer/devcontainer.json. The base image, Features, and lifecycle hooks apply identically; only the editor layer — extensions vs plugins — differs per IDE.
What about the customizations.vscode block in JetBrains? It's ignored by JetBrains, since it's VS Code-specific. The container definition (image, Features, hooks) still applies. Configure JetBrains plugins and settings through the IDE for that editor, keeping the shared parts of the config editor-agnostic.
Can a team mix VS Code and JetBrains on one repo? Yes — that's a strength of the spec. Everyone builds the same container from the committed config; each developer's editor adds its own plugins on top. Keep the base image, Features, and hooks free of editor-specific assumptions and both work.
Related
- Up to VS Code DevContainer Extension Deep Dive — the client/server model both editors share.
- Using VS Code Remote Containers without Docker Desktop — engine options that also serve JetBrains.
- Understanding the DevContainer Specification — the editor-agnostic spec.