Reputation: 3692
I have a relatively older Windows machine, so I had to install Docker Toolbox instead of Docker Desktop. The documentation says Docker Toolbox already consists of Compose and other necessary apps -
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.
But when I try to run docker-compose
from the terminal, it says command not found.
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
I do have Docker Toolbox installed successfully. Here's the output when I run the "Docker Quick Start Terminal" from start menu -
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
And, docker is also on the PATH -
If Docker Toolbox already consists of Docker Compose, why isn't it working?
Upvotes: 2
Views: 6058
Reputation: 2806
I had the same problem. Adding C:\Program Files\Docker Toolbox\
to PATH in System Variables then restarting the terminal worked for me.
Upvotes: 1