Builds on #30782, which is merged; the branch now merges `main`. Adds `Coder.LatinAbbreviations`, a Vale rule that enforces [Latin abbreviations](https://github.com/coder/coder/blob/main/docs/.style/style-guide/accessibility-and-inclusion.md#latin-abbreviations). - Suggests "for example", "that is", and "and so on" for `e.g.`, `i.e.`, and `etc.`, including `eg.`, `ie.`, and a missing final period (`e.g`). - Severity: `suggestion`. Scope: `docs/**` except `docs/.style/style-guide/**`, limited to paragraphs, lists, headings, and blockquotes. Table cells and code are skipped. - Baseline: 170 findings in 91 files. The brief estimated 148. - Cleanup: 153 findings fixed across 81 hand-written pages, 0 left in linted pages. The count is lower than the original 158 because other PRs on `main` already rewrote or removed some of the lines, and `parameters.md` was deleted on `main`. - `vs.` and `et al.` aren't flagged. Commits: 1. `docs(docs): use English forms of Latin abbreviations` 2. `feat(docs/.style): enable Coder.LatinAbbreviations Vale rule` Generated pages: `.vale.ini` skips `docs/reference/{api,cli}/*.md` and `docs/admin/setup/configuration-reference.md` for this rule, as it does for `Coder.UnitSpacing`. Their prose comes from CLI flag help text and Swagger comments in Go source, and `make gen` rewrites them, so a hand edit fails the `gen` check (an earlier revision of this PR edited `configuration-reference.md` and failed `gen` for that reason). Cleaning them means editing Go and regenerating the help golden files and API docs, which is left for a follow-up. Linear: DOCS-450 <details> <summary>Decision log</summary> - `extends: substitution`, so the message names the replacement: "Consider 'for example' instead of 'e.g.'". - `scope: [paragraph, list, heading, blockquote]`. The single scope `paragraph` skips list items, blockquotes, and headings, so all four are listed. Table cells have their own scope and stay excluded. - Explicit `[Ee]` and `[Ii]` classes with `ignorecase: false`, so sentence-initial `E.g.,` still matches but the browser name `IE.` doesn't. - `eg.` and `ie.` require the trailing period so ordinary words and file extensions stay quiet. - Cleanup rules, applied by script and then reviewed line by line: - `e.g.` and `i.e.` become "for example," and "that is," (capitalized at the start of a sentence), with a comma added when the original had none. - `etc.` becomes "and so on", with the sentence-ending period kept when `etc.` closed the sentence. - Lines inside table rows, fenced blocks, and code spans are untouched, so are the style guide and the generated pages. - Hard-wrapped lines keep their wrapping, and CRLF files keep CRLF. - The rest of the Vale output is unchanged: the per-rule counts for every other rule match the pre-cleanup run. Test cases (fixtures under `/tmp/latin-test/`, not committed), run with LF and CRLF line endings: - Flagged (15 each): `e.g.,` in a paragraph, `i.e.,`, `etc.` at the end of a sentence and before a comma, `eg.`, `ie.`, `e.g` and `i.e` without the final period, `E.g.,`, `I.e.,`, `Etc.`, a blockquote, a list item, a numbered item, and a heading. - Not flagged: a table row with `e.g.,`, `i.e.,`, and `etc.`, code spans, a fenced block, "for example", "that is", "and so on", `IE.`, `genre`, `series`, `egg`, `tie`, `etcetera`, `vs.`, `et al.`. - Known edge case: a path-like token such as `path/i.e/x` outside code matches. It doesn't occur in the corpus. Checks: - `vale --output=line docs/`: 0 `Coder.LatinAbbreviations` findings. - `go run ./scripts/styleclaims` passes. - The pre-commit-light hook passes on both commits. </details> *Generated by [Coder Agents](https://coder.com/docs/ai-coder/agents) on behalf of @nickvigilante.*
9.1 KiB
title
| title |
|---|
| Customizing dev containers |
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 for details.
Ignore a dev container
Use the ignore option to hide a dev container from Coder completely:
{
"name": "My Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"customizations": {
"coder": {
"ignore": true
}
}
}
When ignore is set to true:
- The dev container won't appear in the Coder UI
- Coder won't manage or monitor the container
This is useful for dev containers in your repository that you don't want Coder to manage.
Auto-start
Control whether your dev container should auto-start using the autoStart option:
{
"name": "My Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"customizations": {
"coder": {
"autoStart": true
}
}
}
When autoStart is set to true, the dev container automatically builds and starts during workspace initialization.
When autoStart is set to false or omitted, the dev container is discovered and shown in the UI, but users must manually start it.
Note
The
autoStartoption only takes effect when your template administrator has enabledCODER_AGENT_DEVCONTAINERS_DISCOVERY_AUTOSTART_ENABLE. If this setting is disabled at the template level, containers won't auto-start regardless of this option.
Custom agent name
Each dev container gets an agent name derived from the workspace folder path by default.
You can set a custom name using the name option:
{
"name": "My Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"customizations": {
"coder": {
"name": "my-custom-agent"
}
}
}
The name must contain only lowercase letters, numbers, and hyphens.
This name appears in coder ssh commands and the dashboard (for example, coder ssh my-workspace.my-custom-agent).
Display apps
Control which built-in Coder apps appear for your dev container using displayApps:
Disable built-in apps to reduce clutter or guide developers toward preferred tools
{
"name": "My Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"customizations": {
"coder": {
"displayApps": {
"web_terminal": true,
"ssh_helper": true,
"port_forwarding_helper": true,
"vscode": true,
"vscode_insiders": false
}
}
}
}
Available display apps:
| App | Description | Default |
|---|---|---|
web_terminal |
Web-based terminal access | true |
ssh_helper |
SSH connection helper | true |
port_forwarding_helper |
Port forwarding interface | true |
vscode |
VS Code Desktop integration | true |
vscode_insiders |
VS Code Insiders integration | false |
Custom apps
Define custom applications for your dev container using the apps array:
{
"name": "My Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"customizations": {
"coder": {
"apps": [
{
"slug": "zed",
"displayName": "Zed Editor",
"url": "zed://ssh/${localEnv:CODER_WORKSPACE_AGENT_NAME}.${localEnv:CODER_WORKSPACE_NAME}.${localEnv:CODER_WORKSPACE_OWNER_NAME}.coder${containerWorkspaceFolder}",
"external": true,
"icon": "/icon/zed.svg",
"order": 1
}
]
}
}
}
This example adds a Zed Editor button that opens the dev container directly in the Zed desktop app via its SSH remote feature.
Each app supports the following properties:
| Property | Type | Description |
|---|---|---|
slug |
string | Unique identifier for the app (required) |
displayName |
string | Human-readable name shown in the UI |
url |
string | URL to open (supports variable interpolation) |
command |
string | Command to run instead of opening a URL |
icon |
string | Path to an icon (e.g., /icon/code.svg) |
openIn |
string | "tab" or "slim-window" (default: "slim-window") |
share |
string | "owner", "authenticated", "organization", or "public" |
external |
boolean | Open as external URL (e.g., for desktop apps) |
group |
string | Group name for organizing apps in the UI |
order |
number | Sort order for display |
hidden |
boolean | Hide the app from the UI |
subdomain |
boolean | Use subdomain-based access |
healthCheck |
object | Health check configuration (see below) |
Health checks
Configure health checks to monitor app availability:
{
"customizations": {
"coder": {
"apps": [
{
"slug": "web-server",
"displayName": "Web Server",
"url": "http://localhost:8080",
"healthCheck": {
"url": "http://localhost:8080/healthz",
"interval": 5,
"threshold": 2
}
}
]
}
}
}
Health check properties:
| Property | Type | Description |
|---|---|---|
url |
string | URL to check for health status |
interval |
number | Seconds between health checks |
threshold |
number | Number of failures before marking app unhealthy |
Variable interpolation
App URLs and other string values support variable interpolation for dynamic configuration.
Environment variables
Use ${localEnv:VAR_NAME} to reference environment variables, with optional default values:
{
"customizations": {
"coder": {
"apps": [
{
"slug": "my-app",
"url": "http://${localEnv:HOST:127.0.0.1}:${localEnv:PORT:8080}"
}
]
}
}
}
Coder-provided variables
Coder provides these environment variables automatically:
| Variable | Description |
|---|---|
CODER_WORKSPACE_NAME |
Name of the workspace |
CODER_WORKSPACE_OWNER_NAME |
Username of the workspace owner |
CODER_WORKSPACE_AGENT_NAME |
Name of the dev container agent |
CODER_WORKSPACE_PARENT_AGENT_NAME |
Name of the parent workspace agent |
CODER_URL |
URL of the Coder deployment |
CONTAINER_ID |
Docker container ID |
Dev container variables
Standard dev container variables are also available:
| Variable | Description |
|---|---|
${containerWorkspaceFolder} |
Workspace folder path inside the container |
${localWorkspaceFolder} |
Workspace folder path on the host |
Feature options as environment variables
When your dev container uses features, Coder exposes feature options as environment variables.
The format is FEATURE_<FEATURE_NAME>_OPTION_<OPTION_NAME>.
For example, with this feature configuration:
{
"features": {
"ghcr.io/coder/devcontainer-features/code-server:1": {
"port": 9090
}
}
}
Coder creates FEATURE_CODE_SERVER_OPTION_PORT=9090, which you can reference in your apps:
{
"features": {
"ghcr.io/coder/devcontainer-features/code-server:1": {
"port": 9090
}
},
"customizations": {
"coder": {
"apps": [
{
"slug": "code-server",
"displayName": "Code Server",
"url": "http://localhost:${localEnv:FEATURE_CODE_SERVER_OPTION_PORT:8080}",
"icon": "/icon/code.svg"
}
]
}
}
}
Next steps
- Working with dev containers: SSH, IDE integration, and port forwarding
- Troubleshooting dev containers: Diagnose common issues