Ubuntu's Package Manager 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.

Apart from Snap, Flatpak is another package manager that can be installed on Ubuntu. Interestingly enough, some packages like Firefox exist on all 3 package managers with slight differences. I was only able to get HW acceleration/decoding for iHD driver working on the Flatpak version of firefox. The apt version of firefox did not work despite trying and the Snap version, with its strict sandboxing, would also likely not work. Thus, I can understand the benefits of having choice, however, that comes with complexity and possibly confusion as well.

1
2
3
# flatpak install flathub org.mozilla.firefox
# which firefox
firefox not found

I started doubting my sanity when I had a firefox window open and which firefox returned no results. I then tried installing firefox via Snap/apt, grappled with trying to understand which firefox I had open for a while before I rediscovered flatpak and understood what was happening.