Skip to content

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

Description

@schnell3526

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:

  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:

main...schnell3526:devcontainer-features:feat/vscode-web

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions