Skip to content

Commit 0141028

Browse files
committed
docs: improve dev containers accuracy and clarity
- Add third valid devcontainer.json location for monorepos - Clarify hostname suffix is a deployment setting, link to server docs - Clarify project discovery requires autostart for automatic startup
1 parent 84572dc commit 0141028

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

docs/admin/templates/extending-templates/devcontainers.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,11 @@ resource "coder_devcontainer" "my-repository" {
194194
}
195195
```
196196

197-
### Alternative: Project Discovery Mode
197+
### Alternative: Project Discovery with Autostart
198198

199-
You can enable automatic starting of discovered Dev Containers:
199+
By default, project discovery finds dev containers in Git repositories and
200+
displays them in the Coder UI, but developers must manually start them. To
201+
have discovered containers start automatically, enable autostart:
200202

201203
```terraform
202204
resource "docker_container" "workspace" {
@@ -212,13 +214,15 @@ resource "docker_container" "workspace" {
212214
}
213215
```
214216

215-
With this configuration:
217+
With autostart enabled:
216218

217-
- Project discovery is enabled (default behavior)
218-
- Discovered containers are automatically started (via the env var)
219+
- Discovered containers automatically build and start during workspace initialization
219220
- The `coder_devcontainer` resource is **not** required
220221
- Developers can work with multiple projects seamlessly
221222

223+
Without autostart (the default), discovered containers appear in the dashboard
224+
but require manual startup, giving developers control over which containers run.
225+
222226
> [!NOTE]
223227
>
224228
> When using project discovery, you still need to install the devcontainers CLI

docs/user-guides/devcontainers/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ development environment. You can place it in:
3737

3838
- `.devcontainer/devcontainer.json` (recommended)
3939
- `.devcontainer.json` (root of repository)
40+
- `.devcontainer/<folder>/devcontainer.json` (for multiple configurations)
41+
42+
The third option allows monorepos to define multiple dev container
43+
configurations in separate sub-folders. See the
44+
[Dev Container specification](https://containers.dev/implementors/spec/#devcontainerjson)
45+
for details.
4046

4147
Here's a minimal example:
4248

docs/user-guides/devcontainers/working-with-dev-containers.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ For example:
5757
ssh my-project.my-workspace.alice.coder
5858
```
5959

60-
The hostname suffix defaults to `coder` but can be customized via
61-
`CODER_WORKSPACE_HOSTNAME_SUFFIX`.
60+
The hostname suffix defaults to `coder` but can be customized by your
61+
deployment administrator via the
62+
[`--workspace-hostname-suffix`](../../reference/cli/server.md#--workspace-hostname-suffix)
63+
server option.
6264

6365
This method works with any SSH client, IDE remote extensions, `rsync`, `scp`,
6466
and other tools that use SSH.

0 commit comments

Comments
 (0)