Skip to content

Commit

Permalink
Add build file and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
David Currie committed Nov 28, 2016
1 parent 0a2ce9c commit f5dcf2f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# cpu-usage
Retrieve container CPU usage stats
# Docker CPU Usage Stats

This project builds a simple static golang binary and corresponding Docker image that queries the Docker socket to retrieve the list of running containers and, for each, outputs the total CPU usage and elapsed time since the container was started.

The Docker image can be run as follows:
```bash
docker run -v /var/run/docker.sock:/var/run/docker.sock --rm dcurrie/cpu-usage
2 changes: 2 additions & 0 deletions build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' .

0 comments on commit f5dcf2f

Please sign in to comment.