【发布时间】:2019-05-13 20:56:29
【问题描述】:
我有一台相对较旧的 Windows 机器,所以我不得不安装 Docker Toolbox 而不是 Docker Desktop。 documentation 表示 Docker Toolbox 已经包含 Compose 和其他必要的应用程序 -
Docker Desktop for Windows 和 Docker Toolbox 已经包含 Compose 以及其他 Docker 应用程序,因此大多数 Windows 用户不需要单独安装 Compose。
但是当我尝试从终端运行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 上 -
如果 Docker Toolbox 已经包含 Docker Compose,为什么它不起作用?
【问题讨论】:
标签: docker docker-compose docker-toolbox