You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- You can use an image that already includes npm, such as `codercom/enterprise-node:ubuntu`.
54
35
55
36
## Install the Dev Containers CLI
56
37
@@ -66,7 +47,7 @@ module "devcontainers-cli" {
66
47
}
67
48
```
68
49
69
-
Alternatively, install the devcontainer CLI manually in your base image:
50
+
Alternatively, install `devcontainer/cli` manually in your base image:
70
51
71
52
```shell
72
53
RUN npm install -g @devcontainers/cli
@@ -77,7 +58,7 @@ RUN npm install -g @devcontainers/cli
77
58
If you don't use [`git_clone`](#clone-the-repository), point the resource at the folder that contains `devcontainer.json`:
78
59
79
60
```terraform
80
-
resource "coder_devcontainer" "project" {
61
+
resource "coder_devcontainer" "project" { # `project` in this example is how users will connect to the dev container: `ssh://project.<workspace>.me.coder`
name = "coder-${data.coder_workspace_owner.me.name}-${lower(data.coder_workspace.me.name)}"
295
-
namespace = "coder-workspaces"
296
-
}
297
-
298
-
spec {
299
-
container {
300
-
name = "main"
301
-
image = "codercom/enterprise-base:ubuntu"
302
-
303
-
security_context { privileged = true } # or use Sysbox / rootless
304
-
env { name = "CODER_AGENT_TOKEN" value = coder_agent.main.token }
305
-
}
306
-
}
307
-
}
308
-
```
309
-
310
-
</details>
311
-
312
145
## Troubleshoot Common Issues
313
146
314
147
### Disable dev containers integration
315
148
316
-
To disable the dev containers integration in your workspace, add the `CODER_AGENT_DEVCONTAINERS_ENABLE` environment variable to your existing `coder_agent` block:
317
-
318
-
```terraform
319
-
env = {
320
-
CODER_AGENT_DEVCONTAINERS_ENABLE = "false"
321
-
# existing variables ...
322
-
}
323
-
```
149
+
To disable the dev containers integration in your workspace, set the `CODER_AGENT_DEVCONTAINERS_ENABLE= "false"` environment variable.
0 commit comments