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

Can't import images compressed with zstd #153

Open
lukeyeager opened this issue Feb 21, 2023 · 5 comments
Open

Can't import images compressed with zstd #153

lukeyeager opened this issue Feb 21, 2023 · 5 comments

Comments

@lukeyeager
Copy link
Member

See moby/moby#41759. This is a new feature in docker 23.0.

$ enroot import docker://gscrivano/zstd-chunked:fedora33
[INFO] Querying registry for permission grant
[INFO] Authenticating with user: <anonymous>
[INFO] Authentication succeeded
[INFO] Fetching image manifest list
[INFO] Fetching image manifest
[INFO] Downloading 2 missing layers...

100% 2:0=0s 3fcb8d545795d85012fdfb10c2428e07ff1a2c0f81fd5ac23e01f4cf0bfeecbc

[INFO] Extracting image layers...

0% 0:1=0s 17909b5b15f7d5bfd14401387f8e32c1407bed336b233e857371799c891649f1
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
100% 1:0=0s 17909b5b15f7d5bfd14401387f8e32c1407bed336b233e857371799c891649f1
@3XX0
Copy link
Member

3XX0 commented Feb 22, 2023

Not optimal because it will recompress unnecessarily, but you can do:
ENROOT_GZIP_PROGRAM=zstd enroot import docker://gscrivano/zstd-chunked:fedora33

Or set the option in enroot.conf

@lukeyeager
Copy link
Member Author

Oh, neat workaround! Shall I leave this open so we can decide to improve things later (if zstd images become more common)?

@3XX0
Copy link
Member

3XX0 commented Feb 22, 2023

Yeah I think we can always improve it down the road

@krono
Copy link
Contributor

krono commented Feb 22, 2023

Am I reading that right that import is actually downloading, expecting gzip and then zstd'ing anyways just to unzstd during extraction?
So the option here would be to do nothing on download?

@3XX0
Copy link
Member

3XX0 commented Feb 22, 2023

Yeah, the enroot cache is expected to be compressed in zstd, since most Docker images are gzipped we convert it.
So the above hack uncompress/recompress unnecessarily, we should just skip it if we detect the zstd MIME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants