Skip to content

Commit d052976

Browse files
committed
docs: clarify discovery behavior and improve cross-references
- Explain discovery scans working directory for Git repos - Cross-reference standard devcontainer.json locations instead of repeating - Clarify 'How it works' steps depend on auto-start configuration - Add link to admin docs for autostart env var - Fix 'Currently available' phrasing to avoid staleness
1 parent eacb146 commit d052976

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,15 @@ by setting this to `false`.
121121

122122
Enables automatic discovery of Dev Containers in Git repositories.
123123

124-
When enabled, the agent will:
124+
When enabled, the agent scans the configured working directory (set via the
125+
`directory` attribute in `coder_agent`, typically the user's home directory) for
126+
Git repositories. If the directory itself is a Git repository, it searches that
127+
project. Otherwise, it searches immediate subdirectories for Git repositories.
125128

126-
- Scan the agent directory for Git repositories
127-
- Look for `.devcontainer/devcontainer.json` or `.devcontainer.json` files
128-
- Surface discovered Dev Containers in the Coder UI
129-
- Respect `.gitignore` patterns during discovery
129+
For each repository found, the agent looks for `devcontainer.json` files in the
130+
[standard locations](../../../user-guides/devcontainers/index.md#1-add-a-devcontainerjson)
131+
and surfaces discovered Dev Containers in the Coder UI. Discovery respects
132+
`.gitignore` patterns.
130133

131134
Set to `false` if you prefer explicit configuration via `coder_devcontainer`.
132135

@@ -153,8 +156,8 @@ block in their `devcontainer.json` file. Available options include:
153156
- `displayApps` — Control which built-in apps appear
154157
- `apps` — Define custom applications
155158

156-
See [Customizing dev containers](../../../user-guides/devcontainers/customizing-dev-containers.md)
157-
for the full reference.
159+
For the full reference, see
160+
[Customizing dev containers](../../../user-guides/devcontainers/customizing-dev-containers.md).
158161

159162
## Complete Template Example
160163

docs/user-guides/devcontainers/customizing-dev-containers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ and shown in the UI, but users must manually start it.
5454
> [!NOTE]
5555
>
5656
> The `autoStart` option only takes effect when your template administrator has
57-
> enabled `CODER_AGENT_DEVCONTAINERS_DISCOVERY_AUTOSTART_ENABLE`. If this
58-
> setting is disabled at the template level, containers won't auto-start
57+
> enabled [`CODER_AGENT_DEVCONTAINERS_DISCOVERY_AUTOSTART_ENABLE`](../../admin/templates/extending-templates/devcontainers.md#coder_agent_devcontainers_discovery_autostart_enable).
58+
> If this setting is disabled at the template level, containers won't auto-start
5959
> regardless of this option.
6060
6161
## Custom agent name

docs/user-guides/devcontainers/index.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,13 @@ When a workspace with Dev Containers integration starts:
8888

8989
1. The workspace initializes the Docker environment.
9090
1. The integration detects repositories with dev container configurations.
91-
1. The integration builds and starts the dev container.
92-
1. Coder creates a sub-agent for the container, enabling direct access.
91+
1. Detected dev containers appear in the Coder dashboard.
92+
1. If auto-start is configured (via `coder_devcontainer` or autostart settings),
93+
the integration builds and starts the dev container automatically.
94+
1. Coder creates a sub-agent for the running container, enabling direct access.
95+
96+
Without auto-start, users can manually start discovered dev containers from the
97+
dashboard.
9398

9499
### Agent naming
95100

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ in your `devcontainer.json` file. Coder also maintains a
138138
[repository of features](https://github.com/coder/devcontainer-features) to
139139
enhance your development experience.
140140

141-
Currently available Coder features include
142-
[code-server](https://github.com/coder/devcontainer-features/blob/main/src/code-server):
141+
For example, the
142+
[code-server](https://github.com/coder/devcontainer-features/blob/main/src/code-server)
143+
feature from the [Coder features repository](https://github.com/coder/devcontainer-features):
143144

144145
```json
145146
{

0 commit comments

Comments
 (0)