@@ -19,28 +19,6 @@ Use this page to decide which path fits your project or platform needs.
19
19
| Templates | Standard ` devcontainer.json ` | Terraform + Envbuilder blocks |
20
20
| Suitable for CI / AI agents | Yes. Deterministic, composable | Less ideal. No isolated container |
21
21
22
- ## When To Choose the Dev Containers Integration
23
-
24
- Choose the new integration if:
25
-
26
- - Your workspace image can run Docker (DinD, Sysbox, or a mounted Docker socket).
27
- - You need multiple Dev Containers (like ` frontend ` , ` backend ` , ` db ` ) in a single workspace.
28
- - Developers should own their environment and rebuild on demand.
29
- - You rely on features such as automatic port forwarding, full SSH into containers, or change-detection prompts.
30
-
31
- [ Dev Container integration] ( ./devcontainers.md ) documentation.
32
-
33
- ## When To Choose Envbuilder
34
-
35
- Envbuilder remains a solid choice when:
36
-
37
- - Docker isn’t available or allowed inside the workspace image.
38
- - The platform team wants tight control over container contents via Terraform.
39
- - A single layered environment is sufficient (no need for separate sub-containers).
40
- - You already have Envbuilder templates in production and they meet current needs.
41
-
42
- [ Envbuilder Dev Container] ( ../managing-templates/devcontainers/add-devcontainer.md#envbuilder-terraform-provider ) documentation.
43
-
44
22
## How To Migrate From Envbuilder to the Dev Containers Integration
45
23
46
24
1 . Ensure the workspace image can run Docker and has sufficient resources:
@@ -51,13 +29,20 @@ Envbuilder remains a solid choice when:
51
29
52
30
1 . Remove any Envbuilder blocks that reference ` coder_dev_envbuilder ` from the template.
53
31
1 . Add (or keep) a standard ` .devcontainer/ ` folder with ` devcontainer.json ` in the repository.
54
- 1 . Add the ` devcontainers-cli ` module:
32
+ 1 . Follow the [ dev containers documentation] ( ./devcontainers.md ) for the full list of steps and options.
33
+
34
+ At minimum, add the ` devcontainers-cli ` module and ` coder_devcontainer ` resource:
55
35
56
36
``` terraform
57
37
module "devcontainers_cli" {
58
38
source = "dev.registry.coder.com/modules/devcontainers-cli/coder"
59
39
agent_id = coder_agent.main.id
60
40
}
41
+ resource "coder_devcontainer" "project" { # `project` in this example is how users will connect to the dev container: `ssh://project.<workspace>.me.coder`
42
+ count = data.coder_workspace.me.start_count
43
+ agent_id = coder_agent.main.id
44
+ workspace_folder = "/home/coder/project"
45
+ }
61
46
```
62
47
63
48
1 . Start a new workspace.
0 commit comments