@@ -4,16 +4,11 @@ The dev containers integration enables seamless creation and management of dev c
44This feature leverages the[ ` @devcontainers/cli ` ] ( https://github.com/devcontainers/cli ) and[ Docker] ( https://www.docker.com )
55to provide a streamlined development experience.
66
7- This implementation is different from the existing
8- [ Envbuilder-based dev containers] ( ../../admin/templates/managing-templates/devcontainers/index.md )
9- offering.
10-
117##Prerequisites
128
13- - Coder version 2.22 .0 or later
14- - Coder CLI version 2.22 .0 or later
9+ - Coder version 2.24 .0 or later
10+ - Coder CLI version 2.24 .0 or later
1511- A template with:
16- - Dev containers integration enabled
1712- A Docker-compatible workspace image
1813- Appropriate permissions to execute Docker commands inside your workspace
1914
@@ -30,32 +25,45 @@ which allows for extensive customization of your development setup.
3025When a workspace with the dev containers integration starts:
3126
32271 . The workspace initializes the Docker environment.
33- 1 . The integration detects repositories with a` .devcontainer ` directory or a
34- ` devcontainer.json ` file.
35- 1 . The integration builds and starts the dev container based on the
36- configuration.
28+ 1 . The integration detects repositories with a` .devcontainer ` directory or a` devcontainer.json ` file.
29+ 1 . The integration builds (or rebuilds) and starts the dev container based on the configuration.
37301 . Your workspace automatically detects the running dev container.
31+ 1 . If the configuration changes, the workspace prompts you to rebuild the dev container.
3832
3933##Features
4034
41- ###Available Now
35+ ###Detection & Lifecycle
36+
37+ - Automatic discovery of` .devcontainer ` configs.
38+ - Change detection with rebuild prompts.
39+ - Rebuild containers with one click from the Coder dashboard or from the CLI.
40+
41+ ###Connectivity
42+
43+ - Full SSH access directly into dev containers (` coder ssh --container ... ` ).
44+ - Automatic port forwarding based on` appPort ` ,` forwardPorts ` , or` docker-compose.yml ` .
4245
43- - Automatic dev container detection from repositories
44- - Seamless dev container startup during workspace initialization
45- - Integrated IDE experience in dev containers with VS Code
46- - Direct service access in dev containers
47- - Limited SSH access to dev containers
46+ ##Personal overrides
4847
49- ###Coming Soon
48+ To add tools or tweaks that enhance your personal experience, create a` devcontainer.local.json ` file in the same
49+ directory as the project’s` devcontainer.json ` :
5050
51- - Dev container change detection
52- - On-demand dev container recreation
53- - Support for automatic port forwarding inside the container
54- - Full native SSH support to dev containers
51+ ``` jsonc
52+ {
53+ " extends" : " ./devcontainer.json" ,
54+ " features" : {
55+ " ghcr.io/devcontainers/features/node" : {" version" : " 20" }
56+ },
57+ " postStartCommand" : " npm i -g tldr"
58+ }
59+ ```
60+
61+ Add the file name to your project's` .gitignore ` or to your
62+ [ global exclude file] ( https://docs.github.com/en/get-started/git-basics/ignoring-files#configuring-ignored-files-for-all-repositories-on-your-computer ) .
5563
5664##Comparison with Envbuilder-based Dev Containers
5765
58- | Feature| Dev Containers(Early Access) | Envbuilder Dev Containers|
66+ | Feature| Dev Containers| Envbuilder Dev Containers|
5967| ----------------| ----------------------------------------| ----------------------------------------------|
6068| Implementation| Direct` @devcontainers/cli ` and Docker| Coder's Envbuilder|
6169| Target users| Individual developers| Platform teams and administrators|
@@ -68,12 +76,13 @@ constraints. For additional details on Envbuilder's dev container support, see
6876the
6977[ Envbuilder devcontainer spec support documentation] ( https://github.com/coder/envbuilder/blob/main/docs/devcontainer-spec-support.md ) .
7078
79+ ##Known Limitations
80+
81+ Currently, dev containers are not compatible with the[ prebuilt workspaces] ( ../../admin/templates/extending-templates/prebuilt-workspaces.md ) .
82+
83+ If your template allows for prebuilt workspaces, do not select a prebuilt workspace if you plan to use a dev container.
84+
7185##Next Steps
7286
73- - Explore the[ dev container specification] ( https://containers.dev/ ) to learn
74- more about advanced configuration options
75- - Read about[ dev container features] ( https://containers.dev/features ) to
76- enhance your development environment
77- - Check the
78- [ VS Code dev containers documentation] ( https://code.visualstudio.com/docs/devcontainers/containers )
79- for IDE-specific features
87+ - [ Dev container specification] ( https://containers.dev/ )
88+ - [ VS Code dev containers documentation] ( https://code.visualstudio.com/docs/devcontainers/containers )