Add command in Makefile to get a completly static binary

This commit is contained in:
Thibault Cohen 2015-12-21 14:49:56 -05:00 committed by Thibault Cohen
parent ec6eae9537
commit 27b38649e7
1 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,11 @@ build:
"-X main.Version=$(VERSION)" \
./cmd/telegraf/telegraf.go
build-for-docker:
CGO_ENABLED=0 GOOS=linux go build -o telegraf -ldflags \
"-X main.Version=$(VERSION)" \
./cmd/telegraf/telegraf.go
# Build with race detector
dev: prepare
go build -race -o telegraf -ldflags \