'Can't run docker compose v2 in bash, having to use docker-compose
The new docker compose v2 is supposed to allow to run docker compose, using the space to replace the dash, directly. But if I put it in a .sh file and run it, it can't recognize the command. But I can directly run docker compose from command line. Also if I replace docker compose with docker-compose in the script, it worked. So what am I missing, to make docker compose work in bash script?
Solution 1:[1]
Turns out the probable reason of this is the bash file's EOL issue. The file was originally created on Windows and then copied to Linux.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nico |
