wsl2環境でコンテナ起動時にエラーが発生する

wsl2でdocker-compose up -dを叩いてコンテナを起動するとエラーが発生してしまう。

$ docker-compose up -d

The command ‘docker-compose’ could not be found in this WSL 2 distro. We recommend to activate the WSL integration in Docker Desktop settings.

For details about using Docker Desktop with WSL 2, visit:

https://docs.docker.com/go/wsl2/

うーーーんDocker初心者すぎてわけわからない、
いろいろ検索したら以下の方法で解決した。

docker desktopの設定を開き以下を変更
Resources→WSL integrationを開き
Enable integration with my defalut WSL distroにチェックを入れ
下にある該当WSL2OSをオンにする

どっかー使えるつよつよエンジニアになりたい。

Follow me!

返信を残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

PAGE TOP