mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
docs: document new terraform-managed devcontainers (#21978)
This commit is contained in:
@@ -4,6 +4,13 @@ Coder supports custom configuration in your `devcontainer.json` file through the
|
||||
`customizations.coder` block. These options let you control how Coder interacts
|
||||
with your dev container without requiring template changes.
|
||||
|
||||
> [!TIP]
|
||||
>
|
||||
> Alternatively, template administrators can also define apps, scripts, and
|
||||
> environment variables for dev containers directly in Terraform. See
|
||||
> [Attach resources to dev containers](../../admin/integrations/devcontainers/integration.md#attach-resources-to-dev-containers)
|
||||
> for details.
|
||||
|
||||
## Ignore a dev container
|
||||
|
||||
Use the `ignore` option to hide a dev container from Coder completely:
|
||||
|
||||
@@ -31,6 +31,7 @@ for setup details.
|
||||
- Seamless container startup during workspace initialization
|
||||
- Change detection with outdated status indicator
|
||||
- On-demand container rebuild via dashboard button
|
||||
- Template-defined apps, scripts, and environment variables via Terraform (see [limitations](../../admin/integrations/devcontainers/integration.md#interaction-with-devcontainerjson-customizations))
|
||||
- Integrated IDE experience with VS Code
|
||||
- Direct SSH access to containers
|
||||
- Automatic port detection
|
||||
@@ -95,12 +96,15 @@ containers within your Coder workspace.
|
||||
|
||||
When a workspace with Dev Containers integration starts:
|
||||
|
||||
1. If the template defines `coder_app`, `coder_script`, or `coder_env` resources
|
||||
attached to the dev container, a sub-agent is pre-created with these resources.
|
||||
1. The workspace initializes the Docker environment.
|
||||
1. The integration detects repositories with dev container configurations.
|
||||
1. Detected dev containers appear in the Coder dashboard.
|
||||
1. If auto-start is configured (via `coder_devcontainer` or autostart settings),
|
||||
the integration builds and starts the dev container automatically.
|
||||
1. Coder creates a sub-agent for the running container, enabling direct access.
|
||||
1. Coder creates a sub-agent (or updates the pre-created one) for the running
|
||||
container, enabling direct access.
|
||||
|
||||
Without auto-start, users can manually start discovered dev containers from the
|
||||
dashboard.
|
||||
|
||||
Reference in New Issue
Block a user