Skip to content

Commit 4c0fe1e

Browse files
Disable CGO on release builds (sigstore#1368)
* Disabled CGO in builds Update to debian12-static, we do not need libssl or libc from base Disable cgo in Makefile and goreleaser Signed-off-by: Appu Goundan <[email protected]> * Use nonroot image --------- Signed-off-by: Appu Goundan <[email protected]> Co-authored-by: Hayden B <[email protected]>
1 parent d18978c commit 4c0fe1e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.goreleaser.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ project_name: fulcio
22

33
env:
44
- GO111MODULE=on
5-
- CGO_ENABLED=1
65
- DOCKER_CLI_EXPERIMENTAL=enabled
76
- COSIGN_YES=true
7+
# If you need support for the the "createca" command, you must enable CGO
8+
- CGO_ENABLED=0
89

910
# Prevents parallel builds from stepping on eachothers toes downloading modules
1011
before:

.ko.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
defaultBaseImage: gcr.io/distroless/base-debian10
1+
defaultBaseImage: gcr.io/distroless/static-debian12:nonroot
22
builds:
33
- main: .
44
env:
5-
- CGO_ENABLED=1
6-
# If you are deploying from M1, you can use this (uncomment below, and
7-
# comment out above), though it does remove the support for the "createca" command.
8-
# But at least you can deploy it from M1 using this.
9-
# - CGO_ENABLED=0
5+
- CGO_ENABLED=0
6+
# If you need support for the the "createca" command, you must enable
7+
# CGO and use a base image with gblic (base instead of static)
8+
# - CGO_ENABLED=1
109
flags:
1110
- -trimpath
1211
- -tags

0 commit comments

Comments
 (0)