opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

[cmd/builder] Disable CGO by default

Open evan-bradley opened this issue 1 year ago • 2 comments

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: https://github.com/open-telemetry/opentelemetry-collector/issues/6373

evan-bradley avatar Apr 24 '24 15:04 evan-bradley