Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(agent): add devcontainer autostart support (cherry-pick #17076) #17158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 29, 2025

Conversation

gcp-cherry-pick-bot[bot]
Copy link

Cherry-picked feat(agent): add devcontainer autostart support (#17076)

This change adds support for devcontainer autostart in workspaces. The
preconditions for utilizing this feature are:

  1. The coder_devcontainer resource must be defined in Terraform
  2. By the time the startup scripts have completed,
    • The @devcontainers/cli tool must be installed
    • The given workspace folder must contain a devcontainer configuration

Example Terraform:

resource "coder_devcontainer" "coder" {
  agent_id         = coder_agent.main.id
  workspace_folder = "/home/coder/coder"
  config_path      = ".devcontainer/devcontainer.json" # (optional)
}

Closes #16423

This change adds support for devcontainer autostart in workspaces. The
preconditions for utilizing this feature are:

1. The `coder_devcontainer` resource must be defined in Terraform
2. By the time the startup scripts have completed,
	- The `@devcontainers/cli` tool must be installed
	- The given workspace folder must contain a devcontainer configuration

Example Terraform:

```tf
resource "coder_devcontainer" "coder" {
  agent_id         = coder_agent.main.id
  workspace_folder = "/home/coder/coder"
  config_path      = ".devcontainer/devcontainer.json" # (optional)
}
```

Closes #16423
@matifali matifali requested a review from mafredri March 28, 2025 17:52
@matifali matifali enabled auto-merge (squash) March 28, 2025 19:29
@matifali matifali self-requested a review March 29, 2025 17:00
@matifali matifali merged commit 427e7fe into release/2.21 Mar 29, 2025
29 of 30 checks passed
@matifali matifali deleted the cherry-pick-6a5692-release/2.21 branch March 29, 2025 17:01
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants