Skip to main content

WSL2

https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2


https://docs.microsoft.com/de-de/windows/wsl/install-manual

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

#curl.exe -L -o ubuntu-1804.appx https://aka.ms/wsl-ubuntu-1804
curl -o ubuntu-2004.appx https://aka.ms/wslubuntu2004
#Invoke-WebRequest https://aka.ms/wslubuntu2004

Rename-Item ubuntu-2004.appx ubuntu-2004.zip
Expand-Archive ubuntu-2004.zip ubuntu2004

cd ubuntu2004
.\ubuntu2004.exe

sudo apt update && sudo apt upgrade
sudo apt install ansible

Add your distro path to the Windows environment PATH using Powershell:

$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + "C:\Users\Administrator\ubuntu2004", "User")
This will enable you to launch your distro from any path by typing the .exe launcher. For example using ubuntu2004.exe.

Note that this will require closing and relaunching PowerShell.

 

https://blog.nillsf.com/index.php/2020/06/29/how-to-automatically-start-the-docker-daemon-on-wsl2/

https://medium.com/faun/docker-running-seamlessly-in-windows-subsystem-linux-6ef8412377aa