Why is docker compose up
cannot be executed under jenkins' workspace directory, saying no configuration file provided: not found
:
# It doesn't work under the jenkins workspace
root@VM-0-7-ubuntu:/var/lib/jenkins/workspace/minimal-react-app# ls
dist docker docker-compose.yml
root@VM-0-7-ubuntu:/var/lib/jenkins/workspace/minimal-react-app# docker compose up -d
no configuration file provided: not found # <----- why?
# However, it works under user's home directory
root@VM-0-7-ubuntu:/home/ubuntu/minimal-react-app# ls
dist docker docker-compose.yml
root@VM-0-7-ubuntu:/home/ubuntu/minimal-react-app# docker compose up -d
[+] Running 7/7
✔ nginx 6 layers [⣿⣿⣿⣿⣿⣿] 0B/0B Pulled
# ...
They are the same files but inside different folders, but one works and the other don't, why is this?