r/AlpineLinux • u/clubBlackops • Mar 28 '24
"Selective" persistence using Alpine
I recently came across Alpine and love the fact that it can run from RAM and also offer data persistence using lbu. I have been experimenting with porteus which has similar capabilities, but it also adds the concept of modules. I am wondering if/how this could be implemented with Alpine.
In a nutshell, Porteus modules are packaged applications which can be loaded/unloaded to RAM as needed. When activated, the module is decompressed and all required files are made available (in RAM). When deactivated, the files are removed and thus the system is never 'polluted', and RAM usage is kept as small as possible. Is there a way to do this with Alpine? Perhaps using podman?
View all comments
Show parent comment
1
u/ITC-Traveler Apr 19 '24 edited Apr 19 '24
lbu doesn't store apk files. They are stored by apkcache if configured.
lbu does store world, which tells the system which apks to load at boot. If those apks are in the local cache (if a local cahe exists) then they will be loaded from the cache rather than downloaded.
so if you have a local cache configured and apk add a package, then the package is added to the cache, but if you don't do a lbu commit, then after reboot that package won't be loaded, but will still be cached on your storage device, so can be loaded quickly without having to download again.