Docker Events Types?
Docker containers will report the following events:
attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, export, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update
Docker images report the following events:
delete, import, load, pull, push, save, tag, untag
Docker volumes report the following events:
create, mount, unmount, destroy
Docker networks report the following events:
create, connect, disconnect, destroy
Docker plugins report the following events:
enable, disable, install, remove
Docker daemons report the following events:
reload
Docker services report the following events:
create, remove, update
Docker nodes report the following events:
create, remove, update
Docker secrets report the following events:
create, remove, update
Docker configs report the following events:
create, remove, update
Docker events commands example
Listening for Docker events
$ docker events
Listening for events since a given date
$ docker events --since '2015-01-28'
$ docker events --since '3m'
Listening for Docker events based on filter
$ docker events --filter 'type=container' --format 'Type={{.Type}} Status={{.Status}} ID={{.ID}}'
$ docker events --filter 'event=stop'
$ docker events --filter 'image=ubuntu-1:14.04'
$ docker events --filter 'container=7805c1d35632'
$ docker events --filter 'container=7805c1d35632' --filter 'container=4386fb97867d'
$ docker events --filter 'container=7805c1d35632' --filter 'event=stop'
$ docker events --filter 'type=volume'
$ docker events --filter 'type=network'
$ docker events --filter 'type=plugin' (experimental)
Listening for Docker events based on format
$ docker events --format '{{json .}}'
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND