From ecd64631019d0c08fade670f7d369dab377946c1 Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Sat, 14 Nov 2015 16:33:52 -0800 Subject: [PATCH] static binary \o/ Signed-off-by: Jessica Frazelle --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 520b01205d4..a708972202a 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ export GOPATH:=$(CURDIR)/Godeps/_workspace:$(GOPATH) all: go build -tags "$(BUILDTAGS)" -o runc . +static: + CGO_ENABLED=1 go build -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static" -o runc . + vet: go get golang.org/x/tools/cmd/vet