Statically link binaries and remove debug information (#1615)

Signed-off-by: Paulo Gomes <pjbgf@linux.com>
pull/1621/head
Paulo Gomes 4 weeks ago committed by GitHub
parent ed51191d7c
commit 0f8dfaf115
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2,10 +2,15 @@
project_name: kube-bench
env:
- GO111MODULE=on
- CGO_ENABLED=0
- KUBEBENCH_CFG=/etc/kube-bench/cfg
builds:
- main: main.go
binary: kube-bench
tags:
- osusergo
- netgo
- static_build
goos:
- linux
- darwin
@ -19,6 +24,9 @@ builds:
- 6
- 7
ldflags:
- "-s"
- "-w"
- "-extldflags '-static'"
- "-X github.com/aquasecurity/kube-bench/cmd.KubeBenchVersion={{.Version}}"
- "-X github.com/aquasecurity/kube-bench/cmd.cfgDir={{.Env.KUBEBENCH_CFG}}"
# Archive customization

Loading…
Cancel
Save