Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu

# install ubuntu from the store
# open the ubuntu app
# set username and password
# close the ubuntu app
wsl --set-version Ubuntu 2

Install Docker & Docker-compose on Ubuntu

# Refresh and install packages
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common libssl-dev libffi-dev git wget nano
# Add user group
sudo groupadd docker
sudo usermod -aG docker ${USER}
# Add docker key and repo
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
# Install docker
sudo apt-get install -y docker-ce containerd.io
# Install docker-compose
sudo curl -sSL https://github.com/docker/compose/releases/download/`curl -s https://github.com/docker/compose/tags | grep "compose/releases/tag" | sed -r 's|.*([0-9]+\.[0-9]+\.[0-9]+).*|\1|p' | head -n 1`/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose

Run docker on startup

echo "sudo service docker start" >> ~/.profile
echo "cd /mnt/" >> ~/.profile
source ~/.profile
Oorsprong (gist.github.com)
    I like to see who's visiting my website, do you accept?
    Do you want to accept tracking cookies?