🐳
Docker DesktopでWSLの統合を有効にしているのに「`The command 'docker-compose'~」への対応法
事象
Docker Desktopの設定でWSLの統合を有効にしているのに、"docker-compose build
"を実行すると、「The command 'docker-compose' could not be found in this WSL 2 distro.
」というエラーが出力される。
masa@DESKTOP-0CNPS43:~/RailsTutorial$ docker-compose build
The command 'docker-compose' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.
See https://docs.docker.com/docker-for-windows/wsl/ for details
解決策
Docker Desktopを再起動する。
- Windows画面右下の通知領域から、Dockerのクジラマークを右クリック"
Quit Docker Desktop
"でDockerを終了。(下記画像参照) - ①の後、Docker Desktopを起動。
再度、"docker-compose build
"を打つと、無事完了しました。
Discussion