Docker on WSL
Docker is a utility which containerizes applications. To set up docker with the WSL, follow these steps:
- Install Docker for Windows.
- Check the WSL version of your Ubuntu distro. In the Ubuntu command line,
wsl.exe -l -v
- If the version of your Ubuntu distro is 1, you need to upgrade to WSL2. To do this, set the version in Windows Powershell.
wsl --set-version Ubuntu 2
- Follow the instructions on the Docker website to add your Ubuntu distro as a Docker resource.
- Test the docker installation. In Ubuntu:
docker run -d -p 80:80 docker/getting-started
And verify the app by accessing the following URL:
http://localhost
You can also see the app running in the Docker GUI.