Extensions
Kloud Workspace comes with preinstalled extensions and installs more from Open VSX, an open source registry for VS Code extensions.
ℹ️ INFO
The VS Code Marketplace terms of use allow Marketplace extensions only with Visual Studio products and services, so the workspace uses Open VSX instead. Some extensions are licensed only for the official VS Code builds and do not work in the workspace.
Adding Extensions
Two methods keep the extensions you add when the container is recreated: install them when a container first starts, or keep the extensions directory on a volume.
💡 TIP
Prefer Install at Boot, so new Kloud Workspace releases can still update the preinstalled extensions.
Install at Boot
When a container first starts, Kloud Workspace installs the .vsix files in ~/.ws/extensions/ (top level only).
At the same first start, it also installs extensions by marketplace ID:
WS_EDITOR_ADDITIONAL_VS_EXTENSIONS: Installs these Marketplace extension IDs at startup.
docker run \
-e WS_EDITOR_ADDITIONAL_VS_EXTENSIONS="dbaeumer.vscode-eslint esbenp.prettier-vscode" \
ghcr.io/kloudkit/workspace:v0.6.0Persistent Extensions
To take full control of the extensions, mount a volume at ~/.local/share/ws-server/extensions. With a named volume, the image's initial content of that directory is copied into the volume.
⚠️ WARNING
Mounting a volume on the extensions directory opts you out of future updates, installs and changes to the preinstalled extensions that come with the workspace.
# Optional: the volume name is explicitly defined
# below, so the following can be skipped
docker volume create my-extensions
docker run \
-v my-extensions:/home/kloud/.local/share/ws-server/extensions \
ghcr.io/kloudkit/workspace:v0.6.0Privately Hosted Gallery
The workspace installs extensions from Open VSX by default. To use your own gallery instead, pick the case that matches it.
Self-Hosted Open VSX
Point each gallery URL at your instance. Set only the keys you serve; the rest keep their Open VSX value:
WS_MARKETPLACE_SERVICE_URL: URL of the gallery API used to search and install extensions (serviceUrl).WS_MARKETPLACE_ITEM_URL: URL of the extension details page (itemUrl).WS_MARKETPLACE_EXTENSION_URL_TEMPLATE: URL template for a single extension's latest metadata (extensionUrlTemplate).WS_MARKETPLACE_RESOURCE_URL_TEMPLATE: URL template for an extension's web resources (resourceUrlTemplate).WS_MARKETPLACE_CONTROL_URL: URL of the gallery's extension control manifest (controlUrl).
docker run \
-e WS_MARKETPLACE_SERVICE_URL=https://vsx.example.com/vscode/gallery \
-e WS_MARKETPLACE_ITEM_URL=https://vsx.example.com/vscode/item \
-e WS_MARKETPLACE_EXTENSION_URL_TEMPLATE='https://vsx.example.com/vscode/gallery/{publisher}/{name}/latest' \
-e WS_MARKETPLACE_RESOURCE_URL_TEMPLATE='https://vsx.example.com/vscode/asset/{publisher}/{name}/{version}/Microsoft.VisualStudio.Code.WebResources/{path}' \
ghcr.io/kloudkit/workspace:v0.6.1Any Other Gallery
For a gallery that implements the VS Code Extension Gallery API with a different layout, pass the whole gallery as JSON:
WS_MARKETPLACE_GALLERY: Replaces the whole extension gallery with a JSON object (extensionsGallery).
Any per-key variable above that is also set overrides its key in the JSON.
⚠️ WARNING
We strongly discourage you from setting this for the official VS Code Marketplace, since it infringes on the terms of use.
Prepackaged Extensions
The table lists the preinstalled extensions and their licenses; some also come with customized settings.
Thanks to the developers of these extensions.