Skip to content

Commit

Permalink
Make binaries actually static
Browse files Browse the repository at this point in the history
#49 broke promtail with
standard_init_linux.go:178: exec user process caused "no such file or directory"

From https://medium.com/@diogok/on-golang-static-binaries-cross-compiling-and-plugins-1aed33499671
CGO_ENABLED=0 makes it static, afaics

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
  • Loading branch information
gouthamve committed Dec 10, 2018
1 parent 8fa9461 commit 26a87c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ $(EXES) $(PROTO_GOS) $(YACC_GOS) lint test shell check-generated-files: loki-bui
else

$(EXES): loki-build-image/$(UPTODATE)
go build $(GO_FLAGS) -o $@ ./$(@D)
CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D)
$(NETGO_CHECK)

%.pb.go: loki-build-image/$(UPTODATE)
Expand Down

0 comments on commit 26a87c9

Please sign in to comment.