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

Inject CGO_ENABLED env variable into build container #281

Open
mahendrapaipuri opened this issue Dec 11, 2023 · 0 comments
Open

Inject CGO_ENABLED env variable into build container #281

mahendrapaipuri opened this issue Dec 11, 2023 · 0 comments

Comments

@mahendrapaipuri
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant