Open peter1000 opened 10 years ago
This is a good idea. I think, going off the example of git, we could call it subuser bundle
...
Not sure if that would be the best for what I had in mind.
Anyway, I implemented the first part of it to save to file: but will only send a pullrequest after the make image is merged.
at the moment I live in Southamerica so I do not want to be always dependent on the internet even though it works mostly fine
So my idea would be:
Additional folder: savedCompressedProgramImages
subuser save-compressed-image firefox
saves to 'subuser/savedCompressedProgramImages/firefox.tar.xz
The compression is quite ok: the new libubuntu_precise
has 172.2 MB and compresses to a saved one of 36 MB
This I already finished
The second part I will do is a simple: command: install-compressed-image
the third part would be to integrate it into the normal subuser install procedure maybe with an option like
subuser install firefox --allow-saveimage
or something like that
Than it should first check if for any required dependency a saved image is available: this should work from top->bottom of dependencies because if a saved image for x11 is ready we do not need the lower dependent once
Just an idea?
maybe the list argument could also have an option
subuser list savedimage
the example: firefox_libx11_libubuntu_precise
373.2 MB compressed to 92 MB
Anyway if we want we could add a compression level option: xz uses default level 6 of 9
compression level 9 did reduce a test image another 10+%
libubuntu_precise compression6.tar.xz 36.2MB libubuntu_precise compression9.tar.xz 31.9MB
I will work on going over all your comments tomorrow. It's 1 am here, and I want to think this through properly...
It just occured to me, that putting the image-id into the filename won't work on Windows due to the 255 character long path restriction.
I think that we shouldn't worry about that though. Some advanced features may not be supported on outdated operating systems ;)
Do you want an image file and a extra jsonlike
firefox-image.tar.xz
firefox-image.json
firefox-image.json has the output of inspect
That would be fine. But don't put the program name in the name of the files. It is simpler to progam if the names are standard.
hi, in the next couple of days I want have time for this.
Before starting with subuser a couple of days ago I looked into saving compressed docker images to file.
Because I like to be as much as possible internet independent (or if one uses subuser with a slower connection on a mobile ect.. or download limit) I will add the option to save subuser program images to file.
build once transfer and install multiple times.