Skip to content

Commit f7c5272

Browse files
committed
edit dev-containers-envbuilder
1 parent 30372fc commit f7c5272

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

docs/admin/templates/extending-templates/dev-containers-envbuilder.md

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,6 @@ Use this page to decide which path fits your project or platform needs.
1919
| Templates | Standard `devcontainer.json` | Terraform + Envbuilder blocks |
2020
| Suitable for CI / AI agents | Yes. Deterministic, composable | Less ideal. No isolated container |
2121

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-
4422
## How To Migrate From Envbuilder to the Dev Containers Integration
4523

4624
1. Ensure the workspace image can run Docker and has sufficient resources:
@@ -51,13 +29,20 @@ Envbuilder remains a solid choice when:
5129

5230
1. Remove any Envbuilder blocks that reference `coder_dev_envbuilder` from the template.
5331
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:
5535

5636
```terraform
5737
module "devcontainers_cli" {
5838
source = "dev.registry.coder.com/modules/devcontainers-cli/coder"
5939
agent_id = coder_agent.main.id
6040
}
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+
}
6146
```
6247

6348
1. Start a new workspace.

0 commit comments

Comments
 (0)