-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
error building image: error building stage: gzip: invalid header #720
Comments
@drpmma Can you confirm your base image has /tmp dir? |
Yes, and its permission is 1777. But only some images have this issue. |
@drpmma
Bug doesn't reproduce:
|
This issue only happens in some specific images which may be inconvenient to be made public. |
I push a problem image to docker hub and pull it with kaniko. The image pulled from docker hub extracts with no problem. This issue seems causes by improper compression or the unofficial image registry. |
So the error is coming from here https://github.com/GoogleContainerTools/kaniko/blob/master//pkg/util/fs_util.go#L73. Is image, built by kaniko? |
@drpmma Can you try with |
The image is not built by kaniko. And the image can be extracted and run correctly by docker. Below are the logs.
|
This is currently failing when running |
@drpmma could you fix the issue? I'm getting the same error, and trying to build with Buildah works properly... but I need Kaniko for CI. |
+1 |
Any updates on this? I can't build using Kaniko on CI because of this issue. I would really appreciate some help. Thank you. |
Came across same error and could not find a workaround. Wondering if anyone has solved it? |
I get this error when I provide a raw string as build context:
But it goes away if I tar and gzip the contents first:
Something must be triggering kaniko to expect gzipped content, yet the content it receives isn't gzipped. |
Seems like I'm running into this as well. Tracked it down to trying to run a command in an Ubuntu 20.04 image pulled from Amazon's new public registry. So basically, this image fails: public.ecr.aws/lts/ubuntu@sha256:aed3a67ccca8f308fa5e367918f91dde88fb79c5d72e0d139e799da89634bd9e And this image works: ubuntu@sha256:376209074d481dca0a9cf4282710cd30a9e7ff402dea8261acdaaf57a18971dd I hope that helps! I was using Kaniko v1.6.0. |
if it helps, here's a public image that fails too
I was able to test a local Dockerfile by running this command in the folder containing the
trace debug both output
kaniko is downloading the layers from the resgistry, |
Any updates on this? |
Actual behavior
The dockerfile command RUN and USER will lead to "unpack rootfs", which causing "error building image: error building stage: gzip: invalid header".
But the error only happens in some specific images.
Expected behavior
It should work fine.
To Reproduce
Steps to reproduce the behavior:
build the image with kaniko.
Additional Information
The text was updated successfully, but these errors were encountered: