loading...

How to use Docker on windows using VMware Workstation (without hyper-v)

ans_ashkan profile image Ashkan Nourzadeh ・1 min read

I was using docker for windows for a while but it's network adapters doesn't work well for me. causes DNS problems and ....
So I tried to use Docker without hyper-v and came up with this idea of using docker with vmware workstation.

This is how to setup a simple environment:

  1. Install VMware Workstation
  2. Download Docker binaries from https://download.docker.com/win/
  3. Download Docker machine binaries from https://github.com/docker/machine/releases
  4. Download Docker Machine Vmware Workstation driver form https://github.com/pecigonzalo/docker-machine-vmwareworkstation/releases
  5. Extract & Move downloaded files to a directory in your path
  6. Execute docker-machine create --driver=vmwareworkstation dev in cmd to create a machine
  7. Execute docker-machine env dev > dockerdev.bat in cmd to create a batch file called dockerdev.bat and copy/move it to your path
  8. Execute the batch file created in step 7 (dockerdev)
  9. Use docker as usual

Posted on Jul 25 '18 by:

ans_ashkan profile

Ashkan Nourzadeh

@ans_ashkan

Software Developer & Architect interested in High-Performance software. fav langs: dotnet, golang, rust

Discussion

markdown guide
 

As of 2020-05-11, Docker Desktop v2.3.0.1 released with WSL 2 support which makes Docker no longer dependent on the Hyper-V feature of Windows 10. This means that you might not need to go through all these extra steps to get Docker working on a machine that has VMware Workstation installed (as Hyper-V and Workstation are mutually exclusive). This also has the benefit of permitting those with Windows 10 Home editions to install Docker Desktop as well, since the Home edition of Windows doesn't support Hyper-V. You'll just need Windows 10 v2004+ with the WSL 2 feature enabled on your OS, and select the WSL 2 option when installing Docker Desktop.

Here's two awesome guides from Docker on the subject:
docs.docker.com/docker-for-windows...
docker.com/blog/docker-desktop-wsl...

github.com/docker/roadmap/issues/3

 

Hi there, I followed your article, and I was able to get docker to run with vmware workstation installed, but there is a strange networking issue going on.

When trying to run:

curl ----keepalive-time 5

Inside either an alpine linux, or centos linux container, I don't see the TCP keep alive packets being sent.

What is weird, is that if I run a centos VM on the same windows 10 host, and then install docker, and run the same curl command, I do see the keep alives?

Something in the way that  docker-machine-windows-x86_64 creates the virtual machine prevents the docker containers from issuing keep alives.

Which VM type is being used to run docker in?

I'm assuming that it's some sort of linux vm, which should allow apps to specify socket options such as the SO_KEEPALIVE?

Any insight you might have would be greatly appreciated, thank you.

 

Hi Ashkan, installation is successful but unable pull images, i'm getting below error.
docker: image operating system "linux" cannot be used on this platform.

 

Process ran without a hickup! Running docker with ansible in parallel with my GNS3 lab! Thanks Ashkan!

Win10 pro version 1803... Will try on home...

 

Hello, Thanks its working for me, Windows 10 pro version 1809.

cant reach containers by localhost, I have to entre Ip address of VM.

 

Hello, I tryed to follow you tuto but it doesn't works.
Could you be more precise ?
Thanks