I think it would be quite useful to dockerize application to enable users or developers to run it easier- at least in qt-less mode. Steps needed to do it:
What's your opinion on this? If you agree I could try to make some PoC and follow up with it.
The watchers need direct access to OS/Xorg functions, so the only activitywatch component which could actually run within docker and still be useful would be aw-server. We do have mongodb support which could be nicely set-up with docker automatically but as far as I am aware noone is actually using that and since the default database is sqlite I'm not sure how many people would actually care about setting it up in docker.
On the other hand when talking about containerizing, flatpak/snap/appimage support would be really nice since both aw-server and the watchers could run on that, but that would not be for development but for being more stable across distros when packaging all the executables in the releases.
Can you please point me to some example of direct OS/xorg functions used? Afaik it should be doable to use most of OS functionalities from within docker container.
Whole idea was born in my head because I'd like to just run server+watchers in single command and docker-compose seem to be a good fit for that. Flatpak/snap/appimage indeed seem to be a way to go for packaging but I don't have any experience with it.
@mrbox Someone else tried this before but came to the same conclusion as the one @johan-bjareholt mentioned: https://github.com/ActivityWatch/activitywatch/issues/138
aw-watcher-afk needs access to the OS to get time since last input (which in turn is used to infer (non-)AFK state), which on Linux is a HID-hook that cannot (afaik) be set up from Docker (without a lot of ugly hacks). aw-watcher-window needs access to the display server to ask which the active window is.In addition to that, Docker is simply not designed for end-user applications and I can't see any significant value in supporting or maintaining support for it at this time.
Flatpak/Snap/AppImage is a much more fitting approach that's actually designed for end-users (while Docker is exclusively useful for developers), but we'd rather focus on other stuff at the moment.
Closing due to inactivity.
I feel like this might help some people so I'm just gonna leave it here: docker-activitywatch.
Most helpful comment
I feel like this might help some people so I'm just gonna leave it here: docker-activitywatch.