Search code examples
dockerdocker-composewindows-subsystem-for-linux

docker-compose not found under WSL 2


I've got Windows system with Alpine WSL2 integration, and cannot run docker-compose under it. Here is log of my actions in WSL2:

ZHOPOZAVR:~# docker -v
Docker version 20.10.16, build aa7e414fdcb23a66e8fabbef0a560ef1769eace5
ZHOPOZAVR:~# docker-compose -v
/mnt/c/Program Files/Docker/Docker/resources/bin/docker-compose: line 13: /usr/bin/docker-compose: not found
ZHOPOZAVR:~# ls -al /usr/bin | grep docker-compose
lrwxrwxrwx    1 root     root            56 Jan 13 05:41 docker-compose -> /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker-compose
lrwxrwxrwx    1 root     root            59 Jan 13 05:41 docker-compose-v1 -> /mnt/wsl/docker-desktop/cli-tools/usr/bin/docker-compose-v1
ZHOPOZAVR:~# /usr/bin/docker-compose -v
-ash: /usr/bin/docker-compose: not found

WSL2 integration is enabled in my Docker Desktop:

enter image description here


Solution

  • Turned out that somehow Apline WSL doesn't work with docker-compose. Ubuntu works just fine.