Skip to content

Instantly share code, notes, and snippets.

View marcosnils's full-sized avatar

Marcos Nils marcosnils

View GitHub Profile
@marcosnils
marcosnils / gist:b119d7325c469de5175bc8a2571448c1
Created April 12, 2017 03:42 — forked from freshjones/gist:b0713263033df8cc9f44
bash script to monitor and do something with docker events
#!/bin/sh
docker events --filter 'event=start' --filter 'event=stop' | while read event
do
container_id=`echo $event | sed 's/.*Z\ \(.*\):\ .*/\1/'`
echo $container_id