Ubuntu's Docker Snap pecularities

Docker installed using Snap has a pecularity where it is restricted to the user's home directory. The AI models which I used to assist took me round and round convincing me that the file did not exist, or that the version of Docker I was using expected compose.yml instead of docker-compose.yml but this is not so.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# ls /home/app/
docker-compose.yml
# docker compose up
[+] Running 1/1
 ✔ Container app  Running                                                                                                                   0.0s 
# ls /opt/app2/
docker-compose.yml
# docker compose up
no configuration file provided: not found
# docker compose -f /opt/app2/docker-compose.yml up
no configuration file provided: not found

It was only after demonstrating that docker compose managed to run a different app, when the AI model gained some traction and pointed me in the right direction. It is frustrating and a better error message indicating that some sort of permission issue would have helped.