Skip to content

Instantly share code, notes, and snippets.

@KyleBanks
KyleBanks / docker-stats-json
Created Feb 10, 2017
Returns Docker stats as a JSON Object
View docker-stats-json
docker stats --no-stream \
--format "{\"container\": \"{{ .Container }}\", \"memory\": { \"raw\": \"{{ .MemUsage }}\", \"percent\": \"{{ .MemPerc }}\"}, \"cpu\": \"{{ .CPUPerc }}\"}"