From aaee990da4d0bbb4fbb18a8ad35277a1a536d630 Mon Sep 17 00:00:00 2001 From: Nikolas Nyby Date: Fri, 1 Feb 2019 14:51:06 -0500 Subject: [PATCH] Update build command with static linking Making the binary more portable, and less likely for problems wherever we run it. From: http://blog.wrouesnel.com/articles/Totally%20static%20Go%20builds/ --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 381e219..690b44d 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ ROOT_DIR:=$(dir $(realpath $(lastword $(MAKEFILE_LIST)))) all: hound hound: hound.go smtp.go alert.go alertscollection.go config.go - go build . + CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' . fmt: go fmt *.go