The go-dockerclient v1.7.0 now has an ability to specify events filter. But it's dependencies are also updated.
One of those dependencies is mountinfo and the same dependency is used by opencontainers/runc.
The problem is that mountinfo changed it's API and if we just update dockerclient then build is broken.
So we have to update both opencontainers/runc and go-dockerclient
If inspect() call was failed due to connection problems then container will be removed anyway as like ot wasn't found.
This is probably almost never happens in real life but still some missed logic bug
Instead of using configured shell (e.g. bash) we can autodetect default container user's shell and execute it.
This is much safer because not all containers may have installed shell that is configured in ctop.
Currently each time when ctop started it overwrites "shell" config with default value of program argument.
This means that in fact default shell config is never worked at all.
Each second we receive the timer event which makes little sense but log is bloated with the event.
To make logs more readable we can disable logging of this event
Each second we receive the timer event which makes little sense but log is bloated with the event.
To make logs more readable we can disable logging of this event
Instead of calling a heavy inspect api call we can easily changing status just by knowing an action.
Let's do this in a separate channel decouple UI update from basic event loop.
Firstly check health updates because it will be a lot of them especially when a container is unstable.
Clearly handle create event to create a container even if it wasn't started.
Instead of die event handle more precise events like oom, kill and only then trigger refresh.
Lookup the state from a map.