Add command in Makefile to get a completly static binary
This commit is contained in:
parent
ec6eae9537
commit
27b38649e7
5
Makefile
5
Makefile
|
@ -15,6 +15,11 @@ build:
|
||||||
"-X main.Version=$(VERSION)" \
|
"-X main.Version=$(VERSION)" \
|
||||||
./cmd/telegraf/telegraf.go
|
./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
|
# Build with race detector
|
||||||
dev: prepare
|
dev: prepare
|
||||||
go build -race -o telegraf -ldflags \
|
go build -race -o telegraf -ldflags \
|
||||||
|
|
Loading…
Reference in New Issue