-
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
Add Syntax Support #1713
Comments
+1 |
As heredocs seems to be a purely syntactic feature, kaniko might get it for free as soon as it uses BuildKit >= v0.10.1 (as seems to already have happened for some dockerfile:1.2 stuff, see #1568 (comment)): |
I think all issue relate with Dockerfile's new features would make many similar issues.
|
In attempting to build the Dockerfile in the issue description with the latest version of kaniko -
@guillaume-d thanks for the detailed info on the issue and and the linked issue. Currently kaniko is using buildkit NOTE: Can anyone in the thread here confirm if the issue here is resolved? From my investigation it seems the |
I have tested and 1.11.0 does seem to solve the problem. Kaniko output of a manual run from the debug container listed below: INFO[0000] Retrieving image manifest bitnami/php-fpm:latest |
Going to close this as the issue specifically outlined - kaniko parser failing when encountering new docker syntax - is resolved now. As @guillaume-d noted, there still mismatches/not-implemented features that the new syntax adds for docker/dockerfile:1.[2|3|4|etc.] that kaniko will ignore. Bugs related to supporting these features are below for those who want to watch/comment: |
Sorry folks, but heredocs syntax is not supported by Kaniko (as of v1.12.1) properly, as your logs above show: INFO[0032] Args: [-o pipefail -c <<EOF] The Args: values should have been [ -o pipefail <<EOF (script code) ] as per Buildkit. or at least something better than only the heredoc instruction (bash is complaining that the heredoc was not terminated, as it only got the <<EOF line and the rest of the script was ignored). Further proof is the line following this: That would not hold if the script had actually run, since it was making filesystem changes. In short, we end up with an empty step. I can confirm that this is still a problem as I am facing similar behaviour when trying to use the heredoc feature -- it works in Buildkit but fails in Kaniko as per above. The step doesn't fail, but no code runs. |
The worst part about this bug is that Kaniko, on seeing heredoc syntax, gives no error and continues on with the build as if it had successfully executed the RUN statement. I spent lots of time debugging errors further down in my build before I noticed that the heredoc step was essentially just being skipped. 😞 |
I was stunned today to find out that kaniko does not support heredocs in 2024:
^ In Gitlab CI For a Dockerfile like RUN <<EOF
curl -sO https://www.unixodbc.org/unixODBC-2.3.12.tar.gz
...
EOF |
Any progress on this? :) |
I am not sure if this is the appropriate issue to mention this, but the |
Any news ? |
Hello, any news on this? This issue is older than my daughter and she already can walk and say a few words. |
I love this reply :) Yes, it's been a while since they provided a status on this issue |
Any updates on this? Its been a while since status has been provided AND since someone has checked in on this in the comments. |
We are starting to make use of heredoc syntax in our dockerfiles and are requesting the addition of this support in the kaniko container.
A quick test revealed the executor can not parse the syntax in the dockerfile. Below is a sample dockerfile that implements the syntax and the resulting error by the executor:
error building image: parsing dockerfile: Dockerfile parse error line 15: unknown instruction: APT-GET
The text was updated successfully, but these errors were encountered: