You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be explicitly mentioned in the documentation that Here-Documents are a shell feature that is only available to shells supporting this feature and it's just coincidentally available to the Dockerfile RUN instruction due to the shell supporting this feature.
The text was updated successfully, but these errors were encountered:
This section refers to heredocs in Dockerfiles, and has nothing to do with shells. It refers to BuildKit's ability to interpret multi-line RUN and COPY instructions by using heredoc delimiters for those instructions, as shown in the examples.
Are you observing some kind of issue with heredocs in Dockerfiles?
Yet, apparently, the Here-Document is interpreted by the shell, not by the Dockerfile:
When I'm using this Dockerfile:
# escape=`FROM mcr.microsoft.com/windows/servercore:20H2
RUN <<EOT
ECHO.
EOT
… I'm getting this build output:
Sending build context to Docker daemon ...
Step 1/2 : FROM mcr.microsoft.com/windows/servercore:20H2
---> d7c03b5bcc73
Step 2/2 : RUN <<EOT
---> Running in 1e07112fa6d9
<< was unexpected at this time.
The command 'cmd /S /C <<EOT' returned a non-zero code: 1
Is this a docs issue?
Type of issue
Information is incorrect
Description
The Docker documentation claims that Here-Documents are a Docker feature that may be used with every shell.
However, Here-Documents do not work with Windows
cmd
orPowerShell
.Location
https://docs.docker.com/reference/dockerfile/#here-documents
Suggestion
It should be explicitly mentioned in the documentation that Here-Documents are a shell feature that is only available to shells supporting this feature and it's just coincidentally available to the Dockerfile
RUN
instruction due to the shell supporting this feature.The text was updated successfully, but these errors were encountered: