Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable CGO on release builds #1368

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ project_name: fulcio

env:
- GO111MODULE=on
- CGO_ENABLED=1
- DOCKER_CLI_EXPERIMENTAL=enabled
- COSIGN_YES=true
# If you need support for the the "createca" command, you must enable CGO
- CGO_ENABLED=0

# Prevents parallel builds from stepping on eachothers toes downloading modules
before:
Expand Down
11 changes: 5 additions & 6 deletions .ko.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
defaultBaseImage: gcr.io/distroless/base-debian10
defaultBaseImage: gcr.io/distroless/static-debian12:nonroot
builds:
- main: .
env:
- CGO_ENABLED=1
haydentherapper marked this conversation as resolved.
Show resolved Hide resolved
# If you are deploying from M1, you can use this (uncomment below, and
# comment out above), though it does remove the support for the "createca" command.
# But at least you can deploy it from M1 using this.
# - CGO_ENABLED=0
- CGO_ENABLED=0
# If you need support for the the "createca" command, you must enable
# CGO and use a base image with gblic (base instead of static)
# - CGO_ENABLED=1
flags:
- -trimpath
- -tags
Expand Down
Loading