Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running docker shell on Windows

I've just installed Docker toolbox 1.9.1 (only docker itself plus Kitematic as I already have both VirtualBox and Git for Windows installed). Clicking on Docker Quickstart Terminal icon wasn't working so I had to associate it with C:\Program Files (x86)\Git\bin\bash.exe as suggested. Now it starts fine but I'm unable to run docker command:

enter image description here

Kitematic works just fine but I need the shell. How do I fix it?

like image 557
UserControl Avatar asked Feb 09 '26 17:02

UserControl


2 Answers

Check where docker-machine.exe has been installed (or copy the latest released one in your %PATH%) and use that, instead of the quickstart.
From a regular CMD session:

# find the name of the machine created.
docker-machine ls
docker-machine env --shell cmd <nameOfTheMachine>
docker-machine ssh <nameOfTheMachine>

The shell you are after is the one provided by the Linux TinyCore boot2docker.iso image managed by VirtualBox, not the git-bash installed on your Windows host.

like image 120
VonC Avatar answered Feb 12 '26 16:02

VonC


Here is an alternative option. Create the following docker.cmd batch:

cd "%ProgramFiles%\Docker Toolbox"

"%ProgramFiles(x86)%\Git\bin\bash.exe" --login -i "%ProgramFiles%\Docker Toolbox\start.sh"

Now you need to start the default VM in your Oracle VirtualBox Manager (created automatically when you installed Docker for Windows):

enter image description here

and then the batch:

enter image description here

like image 22
UserControl Avatar answered Feb 12 '26 15:02

UserControl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!