Windows: WSL 1 to WSL 2 issue with Docker command over Ubuntu Box
There are sometimes when we need to run docker commands like: "docker-compose up -d httpd php" over Ubuntu Box in Windows environment with Docker Desktop installed in the windows and suddenly we start seeing an issue like as mentioned below:
Issue:
"The command 'docker-compose' could not be found in this WSL 1 distro.
We recommend to convert this distro to WSL 2 and activate
the WSL integration in Docker Desktop settings."
Here we need to understand that we need to convert the distro from WSL 1 to WSL 2 and need to activate the WSL integration in Docker Desktop settings.
Based on the above 2 steps, let's start the first step which is to convert the distro from WSL 1 to WSL 2. We need to run the below command over PowerShell:
Step 1:
wsl --set-version Ubuntu 2
Step 2:
Now we need to enable the same option so that Docker Desktop can now be integrated with Ubuntu Box distro.
Enjoy Learning!!
Comments
Post a Comment