Firing up containers locally is always useful, whatever it is for learning, developing or just being curious.
First off, verify that you have virtualization enabled on your computer, it should return true
(Get-WmiObject Win32_Processor).VirtualizationFirmwareEnabled
True
Then enable Containers and Hyper-V, make sure to run Powershell as admin
Start-Process Powershell -verb Runas
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Hyper-V" -All
Enable-WindowsOptionalFeature -Online -FeatureName "Containers"
Install Docker module and binaries, confirm.
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker-desktop -ProviderName Chocolatey
and then finally, restart your computer
Restart-Computer -Force
Now you have docker installed on your system.
To switch between Linux or Windows containers, choose on the Docker tray icon
Enjoy!