Laravel 在 docker 航行 bash\r

Laravel sail bash\r in docker

我正在尝试 docker 使用 laravel sail 启动一个 laravel 应用程序,但我收到以下关于 sail 容器的错误:

/usr/bin/env: 'bash\r': No such file or directory

我读到的错误仅在 windows 中引起,因为在克隆项目存储库时 core.autocrlf 的选项为 true,但此选项在所有 git config 的系统,但一直报同样的错误,甚至放弃 docker 和 ubuntu 虚拟机也一直报同样的错误。 我附上 git config -l 命令抛出的内容:

file:C:/Program Files/Git/etc/gitconfig diff.astextplain.textconv=astextplain
file:C:/Program Files/Git/etc/gitconfig filter.lfs.clean=git-lfs clean -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.smudge=git-lfs smudge -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.process=git-lfs filter-process
file:C:/Program Files/Git/etc/gitconfig filter.lfs.required=true
file:C:/Program Files/Git/etc/gitconfig http.sslbackend=openssl
file:C:/Program Files/Git/etc/gitconfig http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
file:C:/Program Files/Git/etc/gitconfig core.autocrlf=false
file:C:/Program Files/Git/etc/gitconfig core.fscache=true
file:C:/Program Files/Git/etc/gitconfig core.symlinks=true
file:C:/Program Files/Git/etc/gitconfig pull.rebase=false
file:C:/Program Files/Git/etc/gitconfig credential.helper=manager-core
file:C:/Program Files/Git/etc/gitconfig credential.https://dev.azure.com.usehttppath=true
file:C:/Program Files/Git/etc/gitconfig init.defaultbranch=master
file:C:/Users/hpbay/.gitconfig  core.editor="C:\Users\hpbay\AppData\Local\Programs\Microsoft VS Code\bin\code" --wait
file:C:/Users/hpbay/.gitconfig  core.autocrlf=false

我在另一台机器上有这个错误,解决方案是将 core.autocrlf 设置为 false,但是在这台机器上它执行了很多测试,同样的错误仍然存​​在,有没有人知道它可能是什么除了 core.autocrlf?或者至少看到更详细的错误?

运行 更改了许多项目文件的 dos2unix 命令,它在那里工作。