Docker events

Other topics

Launch a container and be notified of related events

The documentation for docker events provides details, but when debugging it may be useful to launch a container and be notified immediately of any related event:

docker run... & docker events --filter 'container=$(docker ps -lq)'

In docker ps -lq, the l stands for last, and the q for quiet. This removes the id of the last container launched, and creates a notification immediately if the container dies or has another event occur.

Contributors

Topic Id: 6200

Example Ids: 21487

This site is not affiliated with any of the contributors.