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
From An unknown user
From An unknown user
9 Replies
Codercord
Codercord5mo ago
<#1268570292347994133>
Category
Help needed
Product
code-server
Platform
Linux
Logs
Please post any relevant logs/error messages.
Atif
Atif5mo ago
Looks like when you mount a volume to /home/coder it's shadowing the container filesystem
jlehman9
jlehman9OP5mo ago
Is 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?
Atif
Atif5mo ago
Yes that could work but in that case will override the changes you make on each start up
Phorcys
Phorcys5mo ago
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
jlehman9
jlehman9OP5mo ago
@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!
Atif
Atif5mo ago
Good to know that you were able to work around this one.
Phorcys
Phorcys4mo ago
great! i will mark this issue as resolved but feel free to send another message if you need anything
Codercord
Codercord4mo ago
@Phorcys closed the thread.
Want results from more Discord servers?
Add your server