Any way to install App-dependencies automatically on self hosted system (e.g. apt requirements)?

I’m on my way of releasing an App. In order to make the setup hassle-free, I’m searching for ways to install/update dependencies fully automatic… is there any? So far, I learned this things:

State for Frappe Cloud
I know there’s a way to add apt dependencies for packages installed on frappe cloud instances: Installing App APT Dependencies

State for self-hosted/Docker
AFAIK these dependencies won’t auto-install for Docker setups… and will require a manual installation of all dependencies.

Isn’t there any universal solution to manage apt/OS dependencies? What if the required packages depend on the OS being used by the users of my app (I know Debian should be preferred, of course)?