Skip to content

feat: add vscode-web feature (Microsoft's official VS Code web server)#23

Open
schnell3526 wants to merge 2 commits into
coder:mainfrom
schnell3526:feat/vscode-web
Open

feat: add vscode-web feature (Microsoft's official VS Code web server)#23
schnell3526 wants to merge 2 commits into
coder:mainfrom
schnell3526:feat/vscode-web

Conversation

@schnell3526

Copy link
Copy Markdown

Reference implementation for #22 (closes #22).

Summary

Adds a vscode-web feature that installs and runs Microsoft's official VS Code web server (the vscode-server-linux-*-web build behind code serve-web), side by side with the existing code-server feature. This makes Microsoft Marketplace extensions (Pylance, GitHub Copilot, ...) available in dev container web IDEs, and gives dev containers the same editor as the vscode-web registry module without hand-rolled postStartCommand scripts.

The feature is modeled closely on the code-server feature: build-time install with a pinnable version, extensions installed as the remote user, an entrypoint that starts serve-local on container start (default 127.0.0.1:13338, matching the registry module), and a customizations.coder.apps entry for the Coder dashboard.

Design notes

  • Explicit license opt-in. The Microsoft VS Code Server license must be accepted, so the feature requires acceptLicenseTerms: true and fails the build with a clear error otherwise (the ACCEPT_EULA pattern from Microsoft's own container images), rather than accepting it implicitly:

    "features": {
        "ghcr.io/coder/devcontainer-features/vscode-web:1": {
            "acceptLicenseTerms": true
        }
    }
  • Health check probes /version, not /healthz. The standalone web server exposes no /healthz endpoint (returns 404; /version returns 200). This also affects the registry vscode-web module, whose coder_app healthcheck points at /healthz today.

  • Scenario tests only. Autogenerated tests cannot set feature options, and installation intentionally fails without acceptLicenseTerms, so the feature is excluded from the autogenerated CI matrix and covered by eight scenarios instead (defaults, debian base image, custom port, custom host, extensions under the remote user, pinned version, default folder, log level).

  • The code-server/README.md footer hunk comes from regenerating docs with the current devcontainer CLI (make -B docs); the CI docs check would otherwise flag it.

Testing

All eight scenarios pass locally with devcontainer features test -f vscode-web --skip-autogenerated --skip-duplicated . (devcontainer CLI 0.87.0, linux/arm64 containers). The license gate was verified to fail the build with a clear error when acceptLicenseTerms is not set.

Add a feature that installs and runs Microsoft's official VS Code web
server (the vscode-server-linux-*-web build), as an alternative to
code-server for users who need Microsoft Marketplace extensions such as
Pylance or Copilot.

- Installation requires explicit license opt-in via the
  acceptLicenseTerms option (fails the build otherwise), mirroring the
  ACCEPT_EULA pattern of Microsoft container images.
- The server exposes no /healthz endpoint (returns 404); the Coder app
  health check and the tests probe /version instead.
- vscode-web is covered by scenario tests only: autogenerated tests
  cannot set options, and installation fails without acceptLicenseTerms.
- code-server/README.md footer change comes from regenerating docs with
  the current devcontainer CLI.
- Correct the Coder integration note: the health check probes /version,
  not /healthz (which the standalone web server does not expose), and
  regenerate the README accordingly.
- Pass the extensions scenario option as the canonical comma-separated
  string instead of relying on the CLI's array-to-string coercion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant