Proposal: docker-compose events
Problem
There have been a few requests for supporting some form of "hooks" system within compose (#74, #1341). A feature which runs commands on the host would add a lot of complexity to compose and the compose configuration. Another option is to support these features by providing a way for external tools to run the command triggered by an event. docker events provides an event stream of all docker events, but would still require filtering. `docker-compose events` could provide a similar interface by filtering the events returned by `/events` and return a stream of only the events related to the active compose project. The event stream could also include a new field `"service": <service_name>` in addition to the fields already provided by `/events`
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Proposal: docker-compose events
Hm fancy! If accompanied by some clear examples, this would be a great feature. Given that compose doesn't have a service/daemon. How would this work? (just wondering). Also; will subscribers listen to events for all projects, or receive only events for a specific project?
Trust Score
1 verification
- 1
If accompanied by some clear examples, this would be a great feature.
If accompanied by some clear examples, this would be a great feature.
- 2
Given that compose doesn't have a service/daemon. How would this work? (just won
Given that compose doesn't have a service/daemon. How would this work? (just wondering). Also; will subscribers listen to events for all projects, or receive only events for a specific project?
Validation
Resolved in docker/compose GitHub issue #1510. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep