# https://docs.microsoft.com/de-de/virtualization/windowscontainers/quick-start/quick-start-windows-server

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProvider
Restart-Computer -Force


# If you want to update Docker later:
Get-Package -Name Docker -ProviderName DockerMsftProvider
Find-Package -Name Docker -ProviderName DockerMsftProvider

Install-Package -Name Docker -ProviderName DockerMsftProvider -Update -Force
Start-Service Docker

# Run Demo Container
docker run microsoft/dotnet-samples:dotnetapp-nanoserver


# =================== Server 1709 und WS 2019
# https://www.thomasmaurer.ch/2017/10/how-to-run-docker-linux-container-on-windows-server-1709/

Get-VM D125_WS1709 | Set-VMProcessor -ExposeVirtualizationExtensions $true # optional auf Host, wenn in VM

Get-WindowsFeature containers
Add-WindowsFeature containers
restart-computer
Install-Module DockerProvider
Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview

restart-computer
"Install Check:"
Get-WindowsFeature containers
Get-Service docker
docker images
return
[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "1", "Machine")
Restart-Service Docker

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", $null, "Machine")
Restart-Service Docker