cadvisor/docs/build.md
Ananya Kumar aed91d142e Update build.md
Make it clear how to run cadvisor after building
2015-06-08 16:35:28 -07:00

36 lines
753 B
Markdown

# Building and Testing cAdvisor
**Note**: cAdvisor only builds on Linux since it uses Linux-only APIs.
You should be able to `go get` cAdvisor as expected (we use `-d` to only download):
```
$ go get -d github.com/google/cadvisor
```
We use `godep` so you will need to get that as well:
```
$ go get github.com/tools/godep
```
At this point you can build cAdvisor from the source folder:
```
$GOPATH/src/github.com/google/cadvisor $ godep go build .
```
or run only unit tests:
```
$GOPATH/src/github.com/google/cadvisor $ godep go test ./... -test.short
```
For integration tests, see the [integration testing](integration_testing.md) page.
Now you can run the built binary:
```
$GOPATH/src/github.com/google/cadvisor $ sudo ./cadvisor
```