gpt4 book ai didi

docker - 使用Docker Toolbox在Windows 10的PATH中找不到Docker Compose

转载 作者:行者123 更新时间:2023-12-02 18:28:05 25 4
gpt4 key购买 nike

我有一台相对较旧的Windows计算机,因此必须安装Docker Toolbox而不是Docker Desktop。 documentation表示Docker Toolbox已经包含Compose和其他必要的应用程序-

Docker Desktop for Windows and Docker Toolbox already include Compose along with other Docker apps, so most Windows users do not need to install Compose separately.



但是,当我尝试从终端运行 docker-compose时,它说找不到命令。
npm run docker:init

> @freecodecamp/freecodecamp@0.0.1 docker:init C:\Users\Manish\Documents\Development\Github\FCC\FreeCodeCamp
> docker-compose run -u root --rm freecodecamp bash change_volumes_owner.sh && docker-compose run -u root --rm client bash -c "cd .. && bash change_volumes_owner.sh" && docker-compose run -u root --rm api-server bash -c "cd .. &&
bash change_volumes_owner.sh"

'docker-compose' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1

我确实已成功安装Docker Toolbox。这是我从开始菜单运行“Docker快速入门终端”时的输出-
Starting "default"...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to configure a dhcp server. Sometimes, such confirmation window is minimized in the taskbar.
(default) Waiting for an IP...
Machine "default" was started.
Waiting for SSH to be available...
Detecting the provisioner...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): Regenerating TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...



## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/

docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com

而且,docker也位于PATH上-

enter image description here

如果Docker Toolbox已经由Docker Compose组成,为什么它不起作用?

最佳答案

我有同样的问题。在系统变量的PATH中添加C:\Program Files\Docker Toolbox\,然后重新启动终端对我有用。

关于docker - 使用Docker Toolbox在Windows 10的PATH中找不到Docker Compose,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56119761/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com