Installing VS Code extensions through your Sail Dockerfile is dead-simple.
In your Dockerfile, call
installext <extension ID>.
FROM codercom/ubuntu-dev:latest RUN installext vscodevim.vim
ubuntu-dev-* must be your image’s base for
installext to be available.
Tip: Find an extension’s ID at it’s marketplace page:
Under The Hood
code-server is started with two extension directories:
~/.vscode/extensionscontains extensions for the specific environment.
~/.vscode/host-extensionsis bind-mounted in from
~/.vscode/extensionson the host.
This ensures that
- Projects can specify their extensions.
- Users continue using the extensions that they installed through native VS Code.