coder / coder/devcontainer-features
Proposal: vscode-web feature (Microsoft's official VS Code web server)
- Ngôn ngữ chính
- Shell
- Star
- 14
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## 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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách so sánh tính năng code-server hiện có với bản triển khai tham chiếu vscode-web được liên kết. Xem xét install.sh, tập lệnh entrypoint và các bài kiểm thử kịch bản bao quát các giá trị mặc định, cổng, extension, phiên bản, thư mục và logging. Được xem là hoàn tất khi thêm tính năng với việc chấp nhận giấy phép rõ ràng, kiểm tra health /version, các tùy chọn được liệt kê và các bài kiểm thử kịch bản đều đạt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- vscode
- Lĩnh vực
- devtools
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 48/100