Correct way to pre-install extensions for Coder K8s workspaces?
Hi all, I have tried a couple things to get extensions working but have not been successful:
1. I've tried the code-server docs instructions where I just install them outright after installing the server into the base image https://coder.com/docs/ides/web-ides#code-server
2. I've tried using the
use_cached_extensions
argument but I can't get the extensions to cache somewhere that isn't the home directory.
Basically it seems like when the workspace is created the extensions that were installed to /home/coder/.local/share/code-server/extensions (and CachedExtensionVSIXs etc.) get wiped. Is there a way to keep them when the workspace is created? The workspaces are created in an environment with no access to any extension marketplaces/registries.Web IDEs - Coder Docs
Learn how to configure web IDEs in your templates
9 Replies
<#1268570292347994133>
Category
Help needed
Product
code-server
Platform
Linux
Logs
Please post any relevant logs/error messages.
Looks like when you mount a volume to
/home/coder
it's shadowing the container filesystemIs the solution to just copy the home directory to somewhere else during the image build and then copy the files back over in the workspace statup script?
Yes that could work but in that case will override the changes you make on each start up
you can use /etc/skel and copy it into the home folder on every workspace start
i think we do this in one of the templates
it's not ideal but can be fine
@Phorcys interesting, thanks for that. And @Atif Since we're in an airgapped env I'm not sure if the devs will be making many changes to the extensions. I'll cross that bridge when I hit it haha. I was able to get it working with the process I posed earlier. Thanks!
Good to know that you were able to work around this one.
great!
i will mark this issue as resolved but feel free to send another message if you need anything
@Phorcys closed the thread.