Skip to content

[cmd/builder] Disable CGO by default #10028

@evan-bradley

Description

@evan-bradley

Is your feature request related to a problem? Please describe.
When using a binary output by the builder with no options, I can't use it by default in a scratch image unless it is compiled with CGO_ENALBED=0.

Describe the solution you'd like
Turn off CGO by default in the builder. Allow users to enable it through setting the CGO_ENABLED environment variable.

Additional context
Our contributing guidelines forbid using CGO, and no upstream components I'm aware of use it. We also have CGO_ENABLED=0 set anywhere we build Collector binaries in upstream repositories.

Users have also run into this before: #6373

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions