Commit 4aa1d1c2c0deaab1fc190a974d1eb20b81f6c5e0

Authored by Georg Hopp
1 parent b2445d35

Now really build static binary...maybe slower but more portable

Showing 2 changed files with 6 additions and 4 deletions
@@ -16,7 +16,8 @@ export APP_NAME DOCKER_IMAGE_TAG GOEXE @@ -16,7 +16,8 @@ export APP_NAME DOCKER_IMAGE_TAG GOEXE
16 all: docker 16 all: docker
17 17
18 $(GOEXE): $(GOPATH)/src/$(GOPROJECT)/main.go 18 $(GOEXE): $(GOPATH)/src/$(GOPROJECT)/main.go
19 - GOPATH=$(GOPATH) go install $(GOPROJECT) 19 + GOPATH=$(GOPATH) go install -tags netgo \
  20 + -ldflags '-w -extldflags "-static"' $(GOPROJECT)
20 strip $@ 21 strip $@
21 22
22 docker: react $(GOEXE) 23 docker: react $(GOEXE)
@@ -2,9 +2,10 @@ BIN_DIR = data/bin @@ -2,9 +2,10 @@ BIN_DIR = data/bin
2 DOCROOT_DIR = data/document-root 2 DOCROOT_DIR = data/document-root
3 LIB_DIR = data/lib64 3 LIB_DIR = data/lib64
4 4
5 -LIBS = $(LIB_DIR)/ld-linux-x86-64.so.2 \  
6 - $(LIB_DIR)/libc.so.6 \  
7 - $(LIB_DIR)/libpthread.so.0 5 +LIBS =
  6 +#LIBS = $(LIB_DIR)/ld-linux-x86-64.so.2 \
  7 +# $(LIB_DIR)/libc.so.6 \
  8 +# $(LIB_DIR)/libpthread.so.0
8 9
9 EXE = $(BIN_DIR)/$(APP_NAME) 10 EXE = $(BIN_DIR)/$(APP_NAME)
10 11
Please register or login to post a comment