I want to change the shell to bash.exefrom git-for-windows:
I have the docker file:
FROM mcr.microsoft.com/windows/servercore:1809
# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
RUN choco install -y git
RUN & 'C:/Program Files/Git/bin/sh.exe' -c "ls -al" #### << Passes
SHELL ["\"C:\\Program Files\\Git\\bash.exe\"", "-c"] #### << Passes
RUN ls -al #### << Crashes
Results in the third statement:
/usr/bin/bash: Files/Git/bin/sh.exe: No such file or directory
When I try to quote like the following
SHELL ["\"C:\\Program Files\\Git\\bash.exe\"", "-c"]
RUN ls -al
the build works, but I dont see any output from ls -al and I dont know if it really works?
How can I use bash.exe successfully? I am using docker for windows through WSL2 engine.