[FEATURE REQ] add key bindings for `kill`ing and `restart`ing docker containers from `grofer`
Closed this issue · 4 comments
Is your feature request related to a problem? Please describe.
It'd be cool to kill
or restart
containers from the UI of grofer container
Describe the solution you'd like
k
to kill
and r
to restart
, implementation should be similar to #54, except for how kill
and restart
is sent to the container
Additional context
RAGE KILLLLLLLLLLLLLLL
Have you come across https://github.com/jesseduffield/lazydocker? It has a really cool intuitive UI and could give some ideas on how to implement as well (I use the git counterpart, highly recommended btw)
@anihm136 Yep we're looking for something similar! I recently tried the same locally by using the same docker SDK, it's essentially just one command to kill/remove containers (doc can be found here). But for some reason it kept freezing my host system. Worked like a charm on a virtual machine though.
Edit: @anihm136 if you're willing to take this up, we can assign it to you. Let us know!
Is this SDK restricted to docker only, or more general (maybe at least for OCI containers)? One killer feature would be to get the necessary info from whatever OS feature the container runtime uses (like Linux namespaces, cgroups etc, don't really know about other platforms) instead of having to rely on the command itself, but that might be a tough ask.
I'd definitely like to take this up, but I need to familiarize myself with the codebase again xD. I'm taking up some smaller issues now, will try after if no one else has volunteered by then.
Currently we're fully relying on the docker client SDK, so we currently manage only docker containers. But we could extend it though. We initially thought of fetching metrics straight out of /sys/fs/cgroup
(which is actually fairly straightforward), but this package made things simpler for us and hence we stuck to just docker containers for now.
Additionally, using the docker SDK ensured better compatibility, so if in the future we needed to fetch metrics on other platforms, we wouldn't have much to refactor (at least for containers :P)