Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run docker-compose under WSL 2

According to Docker documentation, using Docker under WSL v2 should be fairly simple:

  1. Install WSL 2 (make sure all the preconditions are met);
  2. Install Docker Desktop 2.2.0 or newer;
  3. In Docker Settings > General enable 'Expose daemon on tcp://localhost:2375 without TLS' and 'Enable the experimental WSL 2 based engine';
  4. Make sure no Docker-related packages are installed in your Linux file system.

Once all this is done, I should be able to run docker or docker-compose commands from my Linux Terminal. But I'm not. I keep getting Command 'docker' not found, but can be installed with sudo apt install docker.io'.

What am I doing wrong?

like image 396
Томица Кораћ Avatar asked Mar 18 '20 19:03

Томица Кораћ


1 Answers

Did you check if the integration is enabled in Resources > WSL Integration as below?

Docker Desktop Settings Snapshot

like image 164
Ketan Damle Avatar answered Oct 14 '22 06:10

Ketan Damle