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

docker import - no longer understands tgz format #20467

Closed
stevenschlansker opened this issue Feb 18, 2016 · 2 comments
Closed

docker import - no longer understands tgz format #20467

stevenschlansker opened this issue Feb 18, 2016 · 2 comments

Comments

@stevenschlansker
Copy link

Part of our "from scratch" build flow includes building an Ubuntu image from scratch (via debootstrap) and then importing it:
tar -cz -C $DEBOOTSTRAP_DIR . | docker import -

This worked fine in Docker 1.8.3, but seems to now fail on both 1.10.0 and 1.10.1:

[steven@Anesthetize:~/ot-code]% tar -cz -C test-dir . | docker import -
Error response from daemon: ApplyLayer exit status 1 stdout:  stderr: archive/tar: invalid tar header
[steven@Anesthetize:~/ot-code]% tar -c -C test-dir . | docker import - 
sha256:246a98fa9b25b3e21b08c436afd137ad5c8731dee0e535424bafc834ae9a7362
[steven@Anesthetize:~/ot-code]% tar -c -C test-dir -f test.tgz . && docker import test.tgz
sha256:567c4b5809f777f20464ead76864734a5ad45738e3d281f695b9f30cdf5a6f2f

So you can stream a tar just fine, or import a tgz file, but not stream a tgz.
I believe this is a regression, although I don't know exactly which intermediate version broke it.

@thaJeztah
Copy link
Member

Looks like a duplicate of #20296, which is fixed by #20367

@stevenschlansker
Copy link
Author

Cool, sorry for the dupe -- it's really hard to sort through all the bugs, after spending 20 minutes looking at the open ones I couldn't go through all the closed ones too :)

Reading through the diff, it looks like it now unconditionally decompresses things -- but i don't know the code well and assume you guys know what you are doing :)

Thanks!

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

2 participants