Trouble with installation

I am brand new to docker. Running into an issue where the start .sh script will not run. Rather than executing, it simply opens in notepad. I have followed the installation instructions meticulously. Re-installing didn’t help.

Using Win 7, boot2docker 1.5.0 from

Any suggestions would be greatly appreciated.


Hi Cartier,

This sounds like any file with the .sh extension is set to open with notepad. You can fix this by:

  • Clicking the start button and selecting Default Programs
  • On the Control Panel > All Control Panel Items > Default Programs window that comes up, click the Associate a file type or protocol with a program
  • In the list of file types you need to find and select the .sh extension
  • After you’ve selected .sh - Click the Change Program… button in the top right
  • You might have the sh.exe program listed in the Recommend Programs section - If so, select it, click OK, Click Close, and you should be good to go
  • If sh.exe isn’t listed you’re going to have to find it - Click the browse button and navigate to C:\Program Files (x86)\Git\Bin\ and select sh.exe - Click Open, Click OK, Click Close, then you should be set


Thank you for the detailed explanation Jerry. That worked to run the file. Now I am getting the following error when running the file:

line 5: clear: command not found

Here is the content of my

set -e

# clear the MSYS MOTD

cd "$(dirname "$BASH_SOURCE")"


if [ ! -e "$ISO" ]; then
    echo 'copying initial boot2docker.iso (run "boot2docker.exe download" to update)'
    mkdir -p "$(dirname "$ISO")"
    cp ./boot2docker.iso "$ISO"

echo 'initializing...'
./boot2docker.exe init

echo 'starting...'
./boot2docker.exe start

./boot2docker.exe ip

echo 'connecting...'
./boot2docker.exe ssh

echo '[Press any key to exit]'

Hi Cartier,

Could you open a terminal (Click start, type cmd, and press enter) - then run the command: echo %PATH%

In the text that is printed out, is the path to C:\Program Files\Boot2Docker for Windows in the list?

If not you can add it by running this command in the terminal: setx PATH “%PATH%;C:\Program Files\Boot2Docker for Windows”

Note: After adding that, you’ll need to close/reopen cmd before running echo %PATH% again.

If that path wasn’t there and you had to add it, does Boot2Docker run?

Hi Jerry,

That path was not there, so I added it. Unfortunately, I am still getting that same error when running Boot2Docker:

line 5: clear: command not found

It seems like your install was corrupted. Do you remember any errors when you did it?

You could try to completely uninstall and the reinstall. Also, if you have any virus software running, you might disable it temporarily while you do the new install. - It could have possibly caused issues the first time.

Hi Jerry,

I successfully loaded on a different machine. However, now I am getting an error when running the docker run hello-world example image.

Ran the command: docker run hello-world

and got back this error:

FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

Any advice?

It is due to the docker server is not started correctly

just restart the boot2docker vm or run sudo /etc/init.d/docker restart

In 1.5.0, it happens more frequent than before

for the issues, it requires the “unix” environment to execute. It happens in clean Windows env often.

It could be the bug to be improved, I guess.