From fcfd0b4d401698675896a4e11970a7a7f55bae18 Mon Sep 17 00:00:00 2001 From: Lim Swee Tat Date: Mon, 22 Jan 2024 18:53:09 +0800 Subject: [PATCH] making the build a static build --- makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index f8f20f5..619adc1 100644 --- a/makefile +++ b/makefile @@ -12,12 +12,12 @@ all: $(TARGET) build: $(TARGET) $(TARGET): main.go $(SOURCES) - go build -ldflags="-X 'main.Version=${VERSION}'" -o $(TARGET) + go build -ldflags="-X 'main.Version=${VERSION}' -extldflags '-static'" -o $(TARGET) container: $(TARGET) Dockerfile @#podman rmi $(ORGANIZATION)/$(TARGET):latest $(ORGANIZATION)/$(TARGET):$(VERSION) - podman build -t $(ORGANIZATION)/$(TARGET):latest . - podman tag $(ORGANIZATION)/$(TARGET):latest $(ORGANIZATION)/$(TARGET):$(VERSION) + docker build -t $(ORGANIZATION)/$(TARGET):latest . + # podman tag $(ORGANIZATION)/$(TARGET):latest $(ORGANIZATION)/$(TARGET):$(VERSION) container-save: container rm -f $(TARGET)-$(VERSION).tar