OneGet / MicrosoftDockerProvider

Provider to search, save and install Docker
Other
135 stars 56 forks source link

Fix to enable install on Windows 10 #55

Open ajkauffmann opened 5 years ago

ajkauffmann commented 5 years ago

Script doesn't support installation on latest Windows 10 versions because of an incorrect test. However, it can run the same code for both Windows 10 and Windows Server. Windows Server supports both Install-WindowsFeature and Enable-WindowsOptionalFeature. The difference is that Install-WindowsFeature can be used for both local and remote machine, whereas Enable-WindowsOptionalFeature is only for local machine. We are not installing in a remote machine, so we safely use Enable-WindowsOptionalFeature, no matter if the install runs on Windows 10 or Windows Server.

Other changes:

cwilhit commented 5 years ago

Hey @ajkauffmann Docker EE does not support Windows 10 pro or client. Instead, we recommend users to use Docker Desktop for Windows.

This is not a feature we intend to support in the DockerMsftProvider.

ajkauffmann commented 5 years ago

Now you are confusing me. Why has the DockerMsftProvider code to support Windows 10? I've just suggested a fix to solve an existing issue. It's not that I was introducing a new feature.

Besides that, Docker Desktop for Windows requires Hyper-V. It won't run without Hyper-V installed, whether you use it or not. I want to use process isolation, not Hyper-V isolation. And I don't want to have stuff installed that I don't use at all. But I'm forced to by Docker Desktop. Since the DockerMsftProvider already supported Windows 10, but just had a bug, I thought it might be a good idea to have that fixed.

By the way, Docker EE runs fine on Windows 10 Pro. Don't have any problems at all. Which is not a big surprise, because (as far as I know) Windows 10 and Windows Server 2016 share a lot of core functionality.

sandersaares commented 5 years ago

@cwilhit having a Docker different install method for developer PCs (Windows 10) and production systems (Windows server) is not developer-friendly at all. I have zero desire to support and test two different ways to set up my Docker deployments and to discover surprise differences that only show up on Windows Server later on.

Right now we hack around this manually (and have largely migrated to Linux to avoid this and other Windows Docker issues) but you should not force developers to use unrealistic development configurations.

cwilhit commented 5 years ago

@ajkauffmann @sandersaares thanks to both of you for the feedback. To be clear, the statement for "which Docker version is supported where" is a call made by Docker, so this feedback should be routed to folks over there.

@johnstep FYI - can you help get this feedback to the right folks on Docker's side?

ajkauffmann commented 5 years ago

Well, it seems that Docker does not officially support to install Docker Engine on Windows 10. However, it works, and that's what counts for me. ;-) Anyway, what I don't understand, is that the DockerMsftProvider has code to install Docker Engine on both Windows Server and Windows 10. And Docker refers to DockerMsftProvider to install Docker Engine. Once again, I'm just trying to fix something that is already available in the first place. Please accept the change and make many people happy. Even if it is not officially supported, it's just maintaining an already existing situation.

epernst commented 5 years ago

For us as an enterprise organization to be able to use Docker on our developers Windows 10 pc's, then it has to be the same software, with the same install scripts as elsewhere in the organization. Besides all the technical points mentioned by @ajkauffmann then (to me and many others) Docker Desktop is the Home Edition, while EE is the real version for professionals. We are currently running AJ's fork in our organization, but would love to see he's few lines of code added. Even if you are not officially supporting it! Thank you.

Roemer commented 4 years ago

I need this as well. Simply enabling Hyper-V seems to add around 10-20% cpu load when idle (in a nested virtualization scenario with ESXi at least). So I could speed things up a lot by just not using Hyper-V which does not work with Docker Desktop.

KLuuKer commented 4 years ago

Same for me here, i think allot of people have their development boxes inside virtual machines. Because it's easier to wipe and reload (for cleaning broken installs\software), or simply because it's easier to have side-by-side install of difficult to configure software.

For me it's because i need a huge amount of ram just to run\develop\debug our software on a decent speed. Visual studio because really slow with our huge project and i cannot just run it on my (or any) laptop.

valerysntx commented 4 years ago

@ajkauffmann https://github.com/ajkauffmann/MicrosoftDockerProvider/commit/1c4185ef724f4c0603a2596ecdafab0bf16b15e1#r35489220 Get-wmiobject -class win32_operatingsystem | select-object -ExpandProperty Caption gives 'Microsoft Windows 10 Pro For Workstations' for me...

caspChristian commented 3 years ago

Another one chiming in, I find it plain offensive that someone suggests that I should install a "desktop" app when I just need a cli.

Roemer commented 3 years ago

Another one chiming in, I find it plain offensive that someone suggests that I should install a "desktop" app when I just need a cli.

There is a github repo which provides the exe for cli: https://github.com/StefanScherer/docker-cli-builder/releases and a nuget-package (which I maintain): https://www.nuget.org/packages/docker-cli/

slonopotamus commented 2 years ago

You might want to take a look at Stevedore project as a way to install modern Docker engine for Windows containers on both Windows Server/Client.

SpiralBrad commented 1 year ago

So... why was this not (yet) merged?

Any GOOD answers?