Docs Enterprise Repo

Project-defined Extensions

Installing VS Code extensions through your Sail Dockerfile is dead-simple.

In your Dockerfile, call installext <extension ID>.

For example:

FROM codercom/ubuntu-dev:latest
RUN installext vscodevim.vim

ubuntu-dev or ubuntu-dev-* must be your image’s base for installext to be available.

Tip: Find an extension’s ID at it’s marketplace page:

Extension ID in VS Code

Under The Hood

code-server is started with two extension directories:

  • ~/.vscode/extensions contains extensions for the specific environment.
  • ~/.vscode/host-extensions is bind-mounted in from ~/.vscode/extensions on the host.

This ensures that

  1. Projects can specify their extensions.
  2. Users continue using the extensions that they installed through native VS Code.