Windows Version
Microsoft Windows [Version 10.0.26300.8758]
WSL Version
wslc 2.9.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
No response
Distro Version
No response
Other Software
No response
Repro Steps
- Create a Dockerfile that uses <<xxx redirection in a RUN command and is in DOS file format (i.e., lines are terminated with
\r\n)
FROM docker.io/library/debian:trixie
RUN <<EOF
set -e
touch /tmp/foo
EOF
[This is not a contrived example. Git for Windows will typically extract text files with \r\n line endings.]
- Attempt to build it using
wslc build .
Expected Behavior
It should build successfully:
PS> wslc build -f Dockerfile.test .
Building image from directory: .
[1/2] FROM docker.io/library/debian:trixie
[2/2] RUN <<EOF (set -e...)
exporting to image
| exporting layers
| writing image sha256:8c80c334792040128709827780e6d1d294d6d2df127d7c23ad7e9b0446752cc4
Actual Behavior
The build fails because the command to sh in the Debian image includes carriage returns:
PS> wslc build -f Dockerfile.test .
Building image from directory: .
[1/2] FROM docker.io/library/debian:trixie
[2/2] RUN <<EOF (set -e...)
process "/bin/sh -c set -e\r\ntouch /tmp/foo\r\n" did not complete successfully: exit code: 2
| /bin/sh: 1: set: Illegal option -
Dockerfile:2
--------------------
1 | FROM docker.io/library/debian:trixie
2 | >>> RUN <<EOF
3 | >>> set -e
4 | >>> touch /tmp/foo
5 | >>> EOF
6 |
--------------------
ERROR: failed to solve: process "/bin/sh -c set -e\r\ntouch /tmp/foo\r\n" did not complete successfully: exit code: 2
Error code: E_FAIL
Diagnostic Logs
WslLogs-2026-07-04_14-45-53.tar.gz
Windows Version
Microsoft Windows [Version 10.0.26300.8758]
WSL Version
wslc 2.9.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
No response
Distro Version
No response
Other Software
No response
Repro Steps
\r\n)[This is not a contrived example. Git for Windows will typically extract text files with
\r\nline endings.]wslc build .Expected Behavior
It should build successfully:
Actual Behavior
The build fails because the command to
shin the Debian image includes carriage returns:Diagnostic Logs
WslLogs-2026-07-04_14-45-53.tar.gz