From 0fbf9ca6f5590834d22717551749a90dbdf3892d Mon Sep 17 00:00:00 2001 From: Sean Slattery Date: Tue, 28 Nov 2023 12:38:12 -0600 Subject: [PATCH] Switch from alpine to distroless, add -extldflags static --- .goreleaser.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 197107d9..b91fe42e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -34,7 +34,7 @@ builds: - goos: freebsd goarch: "386" ldflags: - - -s -w -X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=v{{.Version}} + - -extldflags "-static" -s -w -X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=v{{.Version}} archives: - diff --git a/Makefile b/Makefile index dbd20d6b..c1b31dd8 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: build release test build: - go build -o doppler -ldflags="-X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=dev-$(shell git rev-parse --abbrev-ref HEAD)-$(shell git rev-parse --short HEAD)" main.go + GGO_ENABLED=0 go build -o doppler -ldflags="-extldflags "-static" -X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=dev-$(shell git rev-parse --abbrev-ref HEAD)-$(shell git rev-parse --short HEAD)" main.go test: go test ./pkg/... -v