I am new to Docker and am wondering about this particular scenario:
I want to run Docker containers within a VMWare Windows 10 session. I have searched for that scenario and come up either empty or with respondents who wish to change the OP’s world view by telling them “You’re doing it wrong, change your methodology to this…” whatever “this” might happen to be. Or worse, asking “why do you want to do it that way? Do it this way instead…”. In all cases the respondents failed to fully understand the OP’s original question, which amounts to: “Can I run Docker for Windows within a Windows 10 VMWare virtual session and, if so, how?”.
I understand the difference between Docker and VMWare, that’s not the issue. I’ve been a VMWare user since their version 3 so I get how it works and what it provides. Am I a VMWare guru? Nope, that’s part of the charm of VMWare - usually it “just works” and I don’t have to care about the machinery beneath. In the course of my learning, I see that, properly configured, Docker is exactly the same - it “just works” - awesome!
I am a developer, I use Visual Studio (VS) as my dev environment. Microsoft has gone to great lengths to make VS work with Docker. Marvelous! Love it! BUT, the presumption by Microsoft is that VS is running on the host machine or, and I haven’t tried this yet, running under their hypervisor. Never used hypervisor. When it first came out there were way too many problems with it and again, VMWare just worked. Never saw a reason to move off the VMWare platform and doing so now would be a major change for me, one I would very much like to avoid.
My situation is this. Because I travel a great deal I rotate between my own personal machine at home, a company desktop machine and a laptop when traveling, usually issued by DevOps whenever I have to go offsite so the laptop isn’t “mine” it’s whatever happens to be available at the time. Changing that scenario is way above my pay-grade, company policy is something I cannot affect.
My solution up to this point has been to use VMWare to create a session, keep the session on a portable SSD drive and simply ensure that I have either VMWare Player or Workstation available to me, company DevOps has yielded that much as I’m not affecting their “host” machine configuration. It then becomes a simple matter to tune my development environment to suit me with all the additional bells and whistles and custom configurations and other goodies I might desire. Since its my environment with strictly controlled access to the corporate network as designated and configured by company DevOps, they don’t care what’s on my session so I avoid all sorts of political red tape if I wish to try a new version of Windows (yep, even Windows updates come through them, we had to fight a major battle to get them to allow us Windows 10, 2004 and wsl 2!), try a new tool, install a new version of VS (updates to which come out now about every two weeks!), etc.
In short, by using VMWare sessions, my dev environment is exactly what I want it to be, totally under my control as I am the admin on the session and thus able to control group policy, etc. and…it’s PORTABLE! Easily portable! I plug in the drive and viola! back to work and it matters not one whit which machine I might be working on!
Here is the kicker: We finally get to move to .NET Core and all the goodies associated with it and our C-level management has finally acknowledged the existence of Docker so now we get to play. Trouble is, when I went to install Docker for Windows into my Windows 10, 2004 with all updates, WSL2 enabled with both Debian and Alpine session running on the latest version of VMWare for Windows with full VMWare Tools installed, I receive the following error message:
“System.InvalidOperationException: Failed to deploy distro docker-desktop to …\AppData\Local\Docker\wsl\distro: exit code: -1 stdout: Please enable Virtual Machine Platform WIndows feature and ensure virtualization is enabled in the BIOS.”
I checked and both “Virtual Machine Platform” and “Containers” are enabled in “Windows Features” for both the session and the host machine and virtualization is turned on for the host machine and that’s about as far as I can go - there is no “virtualization” setting in the VMWare BIOS for the session. I even took the risk and turned on hyper-v for the session (haven’t tried that for the host yet, am waiting for a response here before I take that plunge despite the articles on MS and VMWare working together to make that “just work”.
So, finally, the question is this: Is there a method of making Docker for Windows Desktop work within a VMWare session running Windows 10, 2004 with wsl 2 such that I might take advantage of all the goodies provided by Visual Studio and Visual Studio Code for Docker and, if so, will someone please provide the link to the instructions for configuring my environment, virtual or otherwise?