Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize application #166

Closed
4 tasks
mrbox opened this issue Jan 23, 2018 · 5 comments
Closed
4 tasks

Dockerize application #166

mrbox opened this issue Jan 23, 2018 · 5 comments

Comments

@mrbox
Copy link

mrbox commented Jan 23, 2018

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:

  • create dockerfiles in all relevant subrepos
  • setup automated builds of images in CI
  • create docker-compose.yml file in main repo
  • [Optional] setup running tests on top of docker

What's your opinion on this? If you agree I could try to make some PoC and follow up with it.

@johan-bjareholt
Copy link
Member

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.

@mrbox
Copy link
Author

mrbox commented Jan 23, 2018

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.

@ErikBjare
Copy link
Member

ErikBjare commented Jan 23, 2018

@mrbox Someone else tried this before but came to the same conclusion as the one @johan-bjareholt mentioned: #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.

@ErikBjare
Copy link
Member

Closing due to inactivity.

@krmbzds
Copy link

krmbzds commented Jul 3, 2019

I feel like this might help some people so I'm just gonna leave it here: docker-activitywatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants