Engineering
November 2nd, 2022

Running a private VS Code Extension Marketplace

author avatar
Mark Milligan
Head of Sales

SHARE

The original article was written by Mark Milligan. We’ve updated it to cover the latest improvements in code-marketplace.

The VS Code IDE was built with extensibility in mind, including adding extensions (plug-ins). Extensions let you easily add languages, debuggers, linters, and other tools to your VS Code installation to support and enhance your developer workflow.

Individual developers and software providers like Microsoft can build VS Code extensions and upload them to an Internet-hosted marketplace like Microsoft or Open VSX where developers can easily search and download them in their IDE.

Coder has enterprise customers in regulated and security-conscious industries like banking, asset management, military, and intelligence where they deploy Coder in an air-gapped network. Accessing an internet-hosted marketplace is not allowed.

Enterprises handle this by downloading the extensions from the internet and bringing them into their secure network. One option is to bake extensions into container images that are the basis of Coder remote development environments. Another option is to put the extensions in a shared volume or Artifactory repository where developers can manually download and import extension .vsix files into their VS Code.

However, for the best developer experience, enterprises can host an air-gapped extension marketplace in their secure network using code-marketplace, an open-source project Coder maintains.

The marketplace reads VS Code extensions from file storage or Artifactory and provides an API for IDEs such as code-server (”VS Code in the web browser”) to search and download the extensions.

code-marketplace is a small, portable Go application. It can run as a standalone binary, system service on a VM, or on Kubernetes via a Helm chart.

If deploying into a VM, download the code-marketplace binary with wget:

The VS Code extensions can reside in a local directory or within jFrog Artifactory as a file store. Adding extensions is as simple as using the binary’s add command from a local .vsix file, a directory of .vsix files, or directly from a marketplace like Open VSX.

Details about integrating code-marketplace into a Coder workspace are in the Coder documentation. For a working example, see this template.

For more information, see code-marketplace on GitHub or chat with the community in our Discord channel.

RELATED ARTICLES

Enjoy what you read?

Subscribe to our newsletter

By signing up, you agree to our Privacy Policy and Terms of service.