Skip to content

Inject CGO_ENABLED env variable into build container #281

@mahendrapaipuri

Description

@mahendrapaipuri

Proposal:
When we use promu with config cgo: true, inject an environment variable CGO_ENABLED=1 into the container.

Use case:
I have a monorepo that uses cgo to build couple of apps and pure go for others. I would like to build go and cgo apps from the same Makefile by looking at CGO_ENABLED env variable. golang-builder image exports this variable during build process but currently there is no way to inject env variables into the container during promu build/crossbuild commands.

@SuperQ Does it make sense injecting CGO_ENABLED=1 into container when cgo is set to true in promu config? If it does, I am happy to put up a PR. Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions