Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Tie the docker events api into libcompose events #511

Open
wagoodman opened this issue Sep 9, 2018 · 0 comments
Open

Tie the docker events api into libcompose events #511

wagoodman opened this issue Sep 9, 2018 · 0 comments

Comments

@wagoodman
Copy link

Currently the libcompose project object can notify when particular events occur via the AddListener function. This is great when you are trying to get events from libcompose actions, however, this doesn't appear to be tied into the docker events api (https://docs.docker.com/engine/api/v1.37/#operation/SystemEvents). This means that it is possible for a container to restart outside of libcompose's control (say with a typical docker restart ... cmd) and there would be no libcompose event.

Such cases where this matters would be when using the project.Log() method to follow logs in realtime, but then a container is restarted.... currently the existing reader is closed and a new one is not reopened once the container is restarted. This results in the Log() method silently loosing all future logs.

Though it is possible to get this functionality outside of libcompose by monitoring events from the docker events api and correlating container events with ids pulled from the libcompose... but this would not be ideal.

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

No branches or pull requests

1 participant