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, 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:
- 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.
- 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:
main...schnell3526:devcontainer-features:feat/vscode-web
Happy to open a PR if this is something you'd take.
Motivation
The
code-serverfeature 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, which runs Microsoft's official VS Code web server (
vscode-server-linux-*-web, the build behindcode serve-web). There is no dev container feature equivalent, so teams whose workspaces standardize on VS Code Web currently have to hand-rollpostStartCommandscripts 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-webfeature to this collection, side by side withcode-server.What the feature does
Modeled closely on the existing
code-serverfeature:install.shdownloads the official web server build at image build time (latest stable by default, pinnable via aversionoption) and installs extensions as the remote userserve-localon container start (default127.0.0.1:13338, matching the registry module)customizations.coder.appsentry surfaces it on the Coder dashboard, same as the code-server featureport,host,connectionTokenFile,serverBasePath,serverDataDir,userDataDir,extensionsDir,extensions,defaultFolder,telemetryLevel,logLevel,logFile,disableWorkspaceTrust, plus theapp*optionsTwo design points worth calling out:
--accept-server-license-terms). Rather than accepting it implicitly, the feature requires an explicitacceptLicenseTerms: trueoption and fails the build with a clear error otherwise — theACCEPT_EULApattern from Microsoft's own container images./healthzendpoint (it returns 404;/versionreturns 200), so the feature's Coder app health check probes/version. Note this also affects the registry vscode-web module, whosecoder_apphealthcheck points at/healthztoday.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:
main...schnell3526:devcontainer-features:feat/vscode-web
Happy to open a PR if this is something you'd take.