I have a Windows Server 2019 VPS(!) machine. Windows Server 2019 keeps recreating folder "C:\ProgramData\docker", even after I manually removed it.
Attempt 1: There's no mention of Docker in my installed programs, so I can't easily uninstall it.
I then tried what's listed here: https://github.com/docker/docs/issues/5905
PS C:\Users\Administrator> UnInstall-Package Docker -ProviderName DockerProvider -Force UnInstall-Package : Unable to find package providers (DockerProvider). At line:1 char:1
- UnInstall-Package Docker -ProviderName DockerProvider -Force
+ CategoryInfo : InvalidArgument: (Microsoft.Power...ninstallPackage:UninstallPackage)
[Uninstall-Package ], Exception + FullyQualifiedErrorId : UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.UninstallPackage
PS C:\Users\Administrator> UnInstall-Module DockerProvider -Force PackageManagement\Uninstall-Package : No match was found for the specified search criteria and module names 'DockerProvider'. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:2194 char:21
- ... $null = PackageManagement\Uninstall-Package @PSBoundParameters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : ObjectNotFound: (Microsoft.Power...ninstallPackage:UninstallPackage) [Uninstall-Package] , Exception
- FullyQualifiedErrorId : NoMatchFound,Microsoft.PowerShell.PackageManagement.Cmdlets.UninstallPackage
Attempt 2: I then ran .\docker-ci-zap.exe -folder "C:\ProgramData\docker
(see https://github.com/jhowardmsft/docker-ci-zap/blob/master/docker-ci-zap.exe) which removed all containers and the folder, but after a VPS restart it's simply back again.
Attempt 3: I opened Server Manager and saw that server role "Hyper-V" is enabled.
I now suspect that this is creating the docker folder, but I'm not sure. Is it safe to remove this role and won't it break my VPS?