coder / coder/devcontainer-features

Proposal: vscode-web feature (Microsoft's official VS Code web server)

未關閉
#22 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Shell
星號
14
分支
2
PR 合併指標
30 天內沒有已合併 PR

描述

## Motivation

The `code-server` feature in this repo is great for putting VS Code in the browser of a dev container, but code-server cannot use the Microsoft Marketplace, so Microsoft-exclusive extensions such as Pylance and GitHub Copilot are unavailable.

For Terraform-managed workspaces Coder already ships the [vscode-web module](https://registry.coder.com/modules/coder/vscode-web), which runs Microsoft's official VS Code web server (`vscode-server-linux-*-web`, the build behind `code serve-web`). There is no dev container feature equivalent, so teams whose workspaces standardize on VS Code Web currently have to hand-roll `postStartCommand` scripts in every repository to get the same editor inside dev containers (Coder Tasks / dev container sub-agents).

I'd like to propose adding a `vscode-web` feature to this collection, side by side with `code-server`.

## What the feature does

Modeled closely on the existing `code-server` feature:

- `install.sh` downloads the official web server build at image build time (latest stable by default, pinnable via a `version` option) and installs extensions as the remote user
- an entrypoint script starts `serve-local` on container start (default `127.0.0.1:13338`, matching the registry module)
- a `customizations.coder.apps` entry surfaces it on the Coder dashboard, same as the code-server feature
- options mirror the server's CLI surface: `port`, `host`, `connectionTokenFile`, `serverBasePath`, `serverDataDir`, `userDataDir`, `extensionsDir`, `extensions`, `defaultFolder`, `telemetryLevel`, `logLevel`, `logFile`, `disableWorkspaceTrust`, plus the `app*` options

Two design points worth calling out:

1. **License**: the Microsoft VS Code Server license must be accepted (`--accept-server-license-terms`). Rather than accepting it implicitly, the feature requires an explicit `acceptLicenseTerms: true` option and fails the build with a clear error otherwise — the `ACCEPT_EULA` pattern from Microsoft's own container images.
2. **Health check**: the standalone web server exposes **no `/healthz` endpoint** (it returns 404; `/version` returns 200), so the feature's Coder app health check probes `/version`. Note this also affects the registry vscode-web module, whose `coder_app` healthcheck points at `/healthz` today.

## Reference implementation

A working implementation, including scenario tests (defaults, debian base image, custom port/host, extensions, pinned version, default folder, log level — all passing locally on the devcontainer CLI), is here:

https://github.com/coder/devcontainer-features/compare/main...schnell3526:devcontainer-features:feat/vscode-web

Happy to open a PR if this is something you'd take.

貢獻指南

開啟貢獻指南

研究方向

Start by comparing the existing code-server feature with the linked vscode-web reference implementation. Review its install.sh, entrypoint script, and scenario tests covering defaults, ports, extensions, versions, folders, and logging. Done means adding the feature with explicit license acceptance, the /version health check, the listed options, and passing scenario tests.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
vscode
領域
devtools
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
描述清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。