docker-compose command not available for mac

Viewed 13761

I installed docker with the instructions here, downloading from docker-hub

https://docs.docker.com/docker-for-mac/install/

But when I run docker-compose I get this error

pyenv: docker-compose: command not found

The `docker-compose' command exists in these Python versions:
3.6.5/envs/myenv

Also, docker-compose is available under /Users

which docker-compose
/Users/<username>/.pyenv/shims/docker-compose

In this link says, docker-compose for mac need not be installed explicitly as it is part of docker for desktop mac.

https://docs.docker.com/compose/install/

Is something wrong with my installation?

3 Answers

I ran into the same issue on macOS today. Turned out that you need to run the installed app once, it does some additional downloading and setup. That setup includes setting up your path variables.

docker-compose is a utility that is now a parameter in mac docker so instead of docker-compose up, its now docker compose up

if you install docker from official website then docker-compose will come along with that for mac so need to either upgrade and documentation is present there.

Related