Expected behavior
Same behavior as under cmd shell:
C:\Users…>docker run ubuntu /bin/echo hello world
hello world
Actual behavior
Error under Git bash (MSYS):
$ docker run ubuntu /bin/echo hello world
c:\CloudStation\Programs\dev\Docker\docker.exe: Error response from daemon: Container command ‘C:/Program Files (x86)/Git/bin/echo’ not found or does not exist…
Information
Git bash is the central piece of my development environment, I used a ton of bash aliases & functions to be more productive. Without a solution to this, I’m stuck with either PowerShell or the standard Windows shell, which doesn’t fit in my workflow at all.
In my bash shell, I’m using that version of Docker: https://get.docker.com/builds/Windows/x86_64/docker-1.11.0.zip
I use the following aliases to execute it:
Folder where I have docker.exe & other utils (docker-compose.exe, etc)
export DOCKER_HOME=$DEV_SOFT_HOME/Docker
Add that folder to the path
append_to_path $DOCKER_HOME
Aliases for those
alias docker=$DOCKER_HOME/docker.exe
alias docker-machine='docker-machine.exe’
alias dockermachine='docker-machine’
alias dm='docker-machine’
alias docker-compose='docker-compose.exe’
alias dc=‘docker-compose’
Steps to reproduce the behavior
Execute the following command under Git bash (MSYS): docker run ubuntu /bin/echo lol