Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENHANCMENT: save compressed subuser images #50

Open
peter1000 opened this issue Feb 17, 2014 · 13 comments
Open

ENHANCMENT: save compressed subuser images #50

peter1000 opened this issue Feb 17, 2014 · 13 comments

Comments

@peter1000
Copy link
Contributor

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.

@timthelion
Copy link
Contributor

This is a good idea. I think, going off the example of git, we could call it subuser bundle...

@timthelion timthelion added this to the 0.3 milestone Feb 17, 2014
@peter1000
Copy link
Contributor Author

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

@peter1000
Copy link
Contributor Author

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?

@peter1000
Copy link
Contributor Author

maybe the list argument could also have an option
subuser list savedimage

@peter1000
Copy link
Contributor Author

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

@peter1000
Copy link
Contributor Author

compression level 9 did reduce a test image another 10+%

libubuntu_precise compression6.tar.xz 36.2MB
libubuntu_precise compression9.tar.xz 31.9MB

@timthelion
Copy link
Contributor

I will work on going over all your comments tomorrow. It's 1 am here, and I want to think this through properly...

peter1000 referenced this issue Feb 18, 2014
This feature needs to be better thought out.  How is the user expected to restore these saved images?  Also, creating a new top level directory for every feature is a no-go, it polutes the directory tree making it harder for the user to orient themselves in the sourcecode.

What exactly is the goal of this feature?  Is the user then going to copy the entire subuser directory over to another machine and type some command like "subuser install-from-saved-images"?  I don't understand the user interface that is expected here...

Tim
@peter1000
Copy link
Contributor Author

see explanation: 47e3647#commitcomment-5405340

@timthelion
Copy link
Contributor

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.

@timthelion
Copy link
Contributor

I think that we shouldn't worry about that though. Some advanced features may not be supported on outdated operating systems ;)

@peter1000
Copy link
Contributor Author

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

@timthelion
Copy link
Contributor

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.

@peter1000
Copy link
Contributor Author

hi,
in the next couple of days I want have time for this.

@timthelion timthelion modified the milestones: 0.4, 0.3 Oct 7, 2014
@timthelion timthelion modified the milestones: 0.5, 0.4 Jun 25, 2015
@timthelion timthelion modified the milestones: 0.6, 0.5 Aug 14, 2015
@timthelion timthelion modified the milestones: 0.5, 0.6 Aug 26, 2015
@timthelion timthelion modified the milestones: 0.6, 0.7 Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants