Tuesday, 29 March 2016

Docker using VMWare workstation on windows

I’ve wanted to explore Docker for a while now being on windows meant I’d need to use VirtualBox which I didn’t want to do since I already have VMWare Workstation installed.

After a bit of a google I found that there was a driver to use VMWare with docker but no posts describing how to use it.  With a bit of trial and error I got it working and thought I’d share how to do it here.

How to..

Before you start you need to be on Windows 7 or above and have VMWare workstation already installed.

First install Docker machine for windows (you can get it from here), this will install all the normal programs needed to run docker.

Next you want to get the VMWare workstation driver from here, its an exe but you don’t run it you just need to copy the driver into the folder where you installed Docker Machine (usually C:\Program Files\Docker Toolbox).

At this point you’ll be able to run a create command which will build a Docker instance but you won’t be able to talk to the container.  The reason for this is the network adapters that VirtualBox installs will stop Docker talking to the VMWare virtual machine.

To be happy that its all working you can simply disable the network adapters and then any container you create should work.  At this point you can either leave as is or uninstall VirtualBox.

One side effect of this is that you won’t be able to use Kitematic since it only works with VirtualBox on windows.

Is this useful?

Even as I write this post I know that the Docker for Windows beta is coming out but that only uses Hyper-V at the moment.  Docker have said that you’ll still be able to use Docker Machine after Docker for Windows arrives and if you want to use VMWare that this may still be the best option for you.


No comments:

Post a Comment