C
Coder.com9mo 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
Codercord9mo ago
<#1215084359061864458>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Zoker
ZokerOP9mo ago
Bump
Atif
Atif9mo ago
Why don't you build a custom base image with your images?
Zoker
ZokerOP9mo 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
Atif9mo 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
Atif9mo 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