Because I hate Electron
Go with one of the ready to use systems. Flatpak, Snap, AppImage. Snap is largely Ubuntu Ecosystem, Flatpak is independent. AppImage is an option if you do not need/want a Sandbox.
Stay away from Docker and LXC for this use case (graphical applications), they are much more work to get going.
Yes, Docker apps are more appropriate for servers and most apps are “made” to run 24/7 to serv the home or workplace.
They are very much worth the “work to setup” as they can be transfered/replicated to any system.
Flatpak and the alike are for running apps on a desktop/laptop.