Skip to content

Commit

Permalink
Statically link binaries and remove debug information (#1615)
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
  • Loading branch information
pjbgf authored May 22, 2024
1 parent ed51191 commit 0f8dfaf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0f8dfaf

Please sign in to comment.