Skip to content

broken heredoc syntax #474

@mzihlmann

Description

@mzihlmann

Actual behavior
subshells that return text with parentheses confuse our busybox shell

RUN <<EOF
if true; then
    echo $(echo "This works")
fi
EOF

RUN <<EOF
if true; then
    echo $(echo "This fails ()")
fi
EOF
sh: syntax error: unexpected "(" (expecting "fi")

Expected behavior
Both should pass, as they do in buildkit. This might not related to something we do in kaniko though.

To Reproduce
Steps to reproduce the behavior:

  1. ...
  2. ...

Additional Information

  • Dockerfile
    Please provide either the Dockerfile you're trying to build or one that can reproduce this error.
  • Build Context
    Please provide or clearly describe any files needed to build the Dockerfile (ADD/COPY commands)
  • Kaniko Image (fully qualified with digest)

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions