Juan
Juan

Reputation: 126

Docker inside Windows VirtualBox

here's the thing: I tried to install docker inside a windows which runs inside virtualbox, and off course I failed due it's not possible (now I know this is due Hyper-V not used by virtualbox and required by docker).

Since for me migrating to VMWare ain't an option, I dig a little bit and found out that there's no problem on running docker inside a linux distro (which runs inside a vbox), so here's the question.

Is it possible to run 2 different virtual machines with virtualbox, one with linux (running docker inside it), and the other one with windows as my development environment, both at the same time and to develop on windows and then deploy and run tests on docker? If this is possible, how? Any links or keywords for me to search for would be appreciated.

Upvotes: 1

Views: 1699

Answers (1)

Jakub Bujny
Jakub Bujny

Reputation: 4628

Sure! You need to do following steps:

  1. You should set your VMs network so then can see easily each other https://superuser.com/questions/119732/how-to-do-networking-between-virtual-machines-in-virtualbox
  2. You should expose docker daemon on TCP socket on VM with linux https://success.docker.com/article/how-do-i-enable-the-remote-api-for-dockerd
  3. On VM with windows you need to create some override for docker client so he will connect to remote daemon on linux machine https://gist.github.com/kekru/4e6d49b4290a4eebc7b597c07eaf61f2#create-bat-file-for-windows
  4. Please keep in mind when you expose some service under ports you won't access that on VM with windows on localhost - instead of that you need to type: :

Upvotes: 3

Related Questions