WSL2 is here for Windows 10 version 2004. The big difference is that Docker containers can now be run from within WSL2. I’ve never been much of a docker aficionado but thought I’d take a look to see how it all worked.
WSL2 isn’t yet at an automatic install or upgrade. There are still some manual steps detailed here. Essentially in an Administrator PowerShell instance:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Restart your machine
wsl --set-default-version 2
- Install a linux distribution: I chose Ubuntu 20.04
- Set up the distro with a username/password
wsl --list --verbose
wsl --set-version <distribution name> <versionNumber>so for mine:
wsl --set-version Ubuntu-20.04 2
PS C:\WINDOWS\system32> wsl --list --verbose NAME STATE VERSION * Ubuntu-20.04 Stopped 1 PS C:\WINDOWS\system32> wsl --set-version Ubuntu-20.04 2 Conversion in progress, this may take a few minutes... For information on key differences with WSL 2 please visit https://aka.ms/wsl2 Conversion complete. PS C:\WINDOWS\system32> wsl --list --verbose NAME STATE VERSION * Ubuntu-20.04 Stopped 2 PS C:\WINDOWS\system32>
There may be some troubleshooting, but it all worked smoothly for me.
If you don’t already have Docker installed then it can be downloaded from here. This link provides a step-by-step to get it all working.
From there it’s a case of pulling the CyberChef docker container. I’ve used one developed by mpepping.
docker pull mpepping/cyberchef
docker run -d -p 8000:8000 mpepping/cyberchef
From here it's exposed on port 8000:
Voila! It does seem *a little* excessive to run a whole docker container for CyberChef. After all I can just download the ZIP and run it locally. But it's a good 'hello-world' way to try docker and get the goodness of CyberChef. Plus, when I inevitably have to do it again, I've got the notes here!