C
Coder.com8mo ago
Zoker

What is the best way to keep installed system packages?

I use ubuntu as my base docker image. In a lot of workspaces I install additional system packages via apt. When I use codespaces and install packages there, they stay on even after a restart. What is the best way to keep them? One way would be to use the personalized file right? Any other/better way without user interference?
6 Replies
Codercord
Codercord8mo ago
<#1215084359061864458>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Zoker
Zoker8mo ago
Bump
Atif
Atif8mo ago
Why don't you build a custom base image with your images?
Zoker
Zoker8mo ago
I already do that, but for some projects you a developer needs package XYZ and another needs ZYX. It would be nice, if the installed packages could be kept. Just like codespaces does it
Atif
Atif8mo ago
If its a docker workspace, you can mount volumes at /usr, /etc/ etc to persist them. This will persist the packages installed by apt.
Atif
Atif8mo ago
I have a template where I am doing this. See https://github.com/matifali/coder-templates/blob/main/deeplearning%2Fmain.tf for reference.
GitHub
coder-templates/deeplearning/main.tf at main · matifali/coder-templ...
Coder OSS templates. Contribute to matifali/coder-templates development by creating an account on GitHub.
Want results from more Discord servers?
Add your server