I thought WSL 2 somehow also supported windows containers but Docker 4.13.1 indicates that Hyper-V is required. 4.16.x just wouldn't work and gave a .//pipe/docker_engine-windows related exception. Could be that it didn't give a proper error message when Hyper-V was missing.
On 4.13.1 I got it running.
-
I didn't immediately have internet. To fix this I had to add
dns: [8.8.8.8]
to the docker engine daemon.json settings. -
After step 1, TLS failed. This old image doesn't have Tls12 turned on by default. Enable it with the following run in the container
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
$command = "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12"
Invoke-Expression $command
Invoke-WebRequest -Uri "https://awscli.amazonaws.com/AWSCLIV2.msi" -Outfile C:\AWSCLIV2.msi
$arguments = "/i `"C:\AWSCLIV2.msi`" /quiet"
Start-Process msiexec.exe -ArgumentList $arguments -Wait
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
aws --version
aws s3 ls