-
Notifications
You must be signed in to change notification settings - Fork 661
Support compressed image files with os/exec #1439
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
Conversation
pkg/downloader/downloader.go
Outdated
default: | ||
return fmt.Errorf("decompressLocal: unknown extension %s", ext) | ||
} | ||
logrus.Infof("decompressing %s with %s", ext, program) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logrus.Infof("decompressing %s with %s", ext, program) | |
logrus.Debugf("decompressing %s with %s", ext, program) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a looong pause here, when using some of the slower compressions like bzip2 or xz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should consider printing progress bars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but that would seem to imply not calling os/exec but using something like archiver ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just use io.MultiWriter(uncompressCmdStdin, progressBar)
.
Can be another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we don't have any progress bars for the copy yet either (probably mostly shown for NFS)
func TestDownloadCompressed(t *testing.T) { | ||
|
||
if runtime.GOOS == "windows" { | ||
// FIXME: `assertion failed: error is not nil: exec: "gzip": executable file not found in %PATH%` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use stdlib for gzip.
Can be another PR in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if anyone is using gzip, because I think the image format supports this natively ?
Fork an external program, rather than linking everything. Keep some files compressed, such as the nerdctl-full tgz. Signed-off-by: Anders F Björklund <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Fork an external program, rather than linking everything.
(like https://github.com/mholt/archiver)
Keep some files compressed, such as the nerdctl-full tgz.
Closes #809