Is it possible to have docker running inside of vmware?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle2
--
Chapters
00:00 Is It Possible To Have Docker Running Inside Of Vmware?
00:48 Answer 1 Score 2
01:23 Accepted Answer Score 22
02:40 Answer 3 Score 12
03:15 Answer 4 Score 0
03:51 Thank you
--
Full question
https://superuser.com/questions/1195676/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows #virtualbox #vmwareworkstation #docker
#avk47
ACCEPTED ANSWER
Score 22
Yes, it's entirely possible to run Docker in a Linux VM. Docker is a light virtualization solution, it doesn't virtualize hardware so you won't be affected by problems typical for nested VMs.
Port binding may be a bit tricky though, because you'll have to somehow connect your dev-env VM in VMware with Docker VM in VirtualBox.
You may also run into problems if you want to expose host's folders to a service in a Docker container. Windows' file systems are limited compared to Linux ones in terms of permission granularity and some services don't like that. (this issue is not Docker-specific)
In general, your app isn't locked to Docker in production. Dockerized services communicate with the world through network, no different than what regular services usually do. However, an app designed with Docker (or, more generally, cloud) in mind may be more resilient to failures and easier to maintain.
VMs with Windows guests may not work, because Docker on Windows uses virtualization to host another Linux VM. Nested virtualization is not officially supported.
ANSWER 2
Score 12
This blog talks about exactly how to use Docker on Windows with VMWare Workstation. You can even use Windows 7.
https://stefanscherer.github.io/yes-you-can-docker-on-windows-7/
First install the Chocolatey package manager for windows (this is a one-line command)
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
then install Docker to use VMWare workstation
choco install -y docker
choco install -y docker-machine
choco install -y docker-machine-vmwareworkstation
Create a default vm
docker-machine --native-ssh create -d vmwareworkstation default
Set your environment variables
docker-machine env | iex
Now you are all set to get started.
ANSWER 3
Score 2
- Yes, you can run docker on Windows. Windows on VMWare also works. We run docker on Linux servers on VMWare.
- The smartest would be to have docker on you production machine also, but it would be possible to copy your data out from the containers. I don't recommend that though.
You can usedocker save
to save your docker images to files.
I think it's worth mentioning that it's not recommended running several applications inside the same container and it's not recommended to store data inside your containers, you should use volumes for that.
ANSWER 4
Score 0
There is a major difference between the docker host (Linux or Windows) :
- The Linux host does not need any virtualization technologies So in Vmware workstation, you can install a standard Linux, then the docker engine and run any containers without problems
- The Windows host has a different requirement because under the hood, it creates an Hyper V Linux VM (details in https://rancher.com/the-similarities-and-differences-between-windows-and-linux-containers/)
So on the Windows docker host in a Vmware Workstation (on your physical Windows), you have a nested HyperV Linux VM ! That's not a big issue, just be careful to enable nested virtualization.
François