Coder.comC
Coder.com6mo ago
16 replies
GR8B8

VS Code Desktop pre-install extensions

Hi everyone! I have Coder installed on a on-premises redhat VM and I'm currently trying to configure pre-installed extensios in a Docker Container starter template.

I followed this guide here to add the extensions .vsix files to the image and install it in the startup script https://coder.com/docs/user-guides/workspace-access/vscode#adding-extensions-to-custom-images.

However, by doing that only the code-server (web browser) had the extensions installed, the VS Code Desktop option starts without them.

I saw at the end of the doc above that for VS Code Desktop to pick up I should use code --extensions-dir ~/.vscode-server/extensions --install-extension "$extension", but it does not have code installed.

Since I'm already running it in a sort of an air-gapped environment, I tryed to install it using the --extensions-dir ~/.vscode-server/extensions at the end of the startup script like "code-server --install-extension /vsix/GitHub.copilot.vsix --extensions-dir ~/.vscode-server/extensions" and it seems to have installed in the VS Code Desktop but not on the code-server (web).

I don't have much knowledge of the differences in the code desktop and the server one, but is there a way to install the extensions once and use it with both desktop and server options?
Coder
Use VSCode with Coder in the desktop or browser
Visual Studio Code | Coder Docs
Solution
Hi, thank you both for the response! I will check the possibility to allow in the firewall the installation of the VS Code Web since it may be exactly what we want. The VS Code Web installs the extensions from the microsoft marketplace or from the openvsx?

Also, I managed to make it work by using the code-server --install-extension ... --extensions-dir in the image and copying the installed extensions folder to the expected location on both the desktop and code-server. Although this is not the intended way to use, it may be useful to validate. Just commenting here cause I didn't find much about this topic that was already posted.
Was this page helpful?