简体   繁体   English

docker-compose 命令不适用于 Mac

[英]docker-compose command not available for mac

I installed docker with the instructions here, downloading from docker-hub我按照这里的说明安装了 docker,从 docker-hub 下载

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

But when I run docker-compose I get this error但是当我运行docker-compose我收到这个错误

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此外,docker-compose 在 /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.在此链接中,不需要明确安装 docker-compose for mac,因为它是 docker for desktop mac 的一部分。

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

Is something wrong with my installation?我的安装有问题吗?

I ran into the same issue on macOS today.我今天在 macOS 上遇到了同样的问题。 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 是一个实用程序,现在是 docker 中的一个参数,所以它现在不是docker-compose up ,而是docker compose up

如果您从官方网站安装 docker,那么 docker-compose 将与 mac 一起提供,因此需要升级并且文档在那里。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM