-
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
Trying to push Docker image to AWS ECR from within Kaniko fails with 'Invalid JSON syntax' on ImageManifest #2815
Comments
Thanks for filing this @SCaveAtWork , could you provide the output when running with docker that succeeds with this Dockerfile? It looks like that the ImageManifest is specifically unsupported by the registry, I am curious in which way kaniko could be different handling this compared with docker. |
@JeromeJu is there a way to extract the |
|
Thanks @SCaveAtWork for the inputs and @RLovelett . There doesn't seem to be a nice way to extract the manifest at the moment for kaniko. But we could add debug logs at https://github.com/GoogleContainerTools/kaniko/blob/main/pkg/image/image_util.go if we would like. Would you like to spin up PR for us to make this a feature that goes into the next release? |
Hello @SCaveAtWork ! |
Thank you, this worked!! All we had to do is change the first line of our Dockerfile as described and we are off to the races! |
As @SCaveAtWork said, this is working for us. On that level, we can just accept the new base container and move on. Should we close this issue? I would add, that the whole thing is a bit of a head scratcher and something does not seem quite right to me. The gallery page says to stop using it and to use the library link instead and cites aws/containers-roadmap#2023 as the reason. However, the GitHub issue is resolved. Doesn't that imply that the image should be good now? Further more, we can push using Docker if we use the "broken" base image but cannot if we use Kaniko. I feel like there is still something different here. In the end, all of this is way beyond my understanding level of containers and container registries (not to mention Docker/Kaniko). There is just something about this that does not seem "correct". |
Actual behavior
Attempting to push to AWS ECR from within Kaniko results in the following error:
Expected behavior
The push should succeed without throwing an invalid JSON error.
To Reproduce
Execute the following to start running inside of Kaniko:
docker run --rm -it -v $PWD:/build -w /build --entrypoint /bin/sh gcr.io/kaniko-project/executor:v1.16.0-debug
Use the following Dockerfile:
And execute the following script, filling in the missing secret values:
The output we are receiving, from this simple example as well as more complex examples, is the following:
Additional Information
kaniko_invalidJSONSyntax.zip
Dockerfile provided above.
Build files provided above.
gcr.io/kaniko-project/executor:v1.16.0-debug
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: