-
Notifications
You must be signed in to change notification settings - Fork 750
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
fix: Propagate CGO_ENABLED environment variable to docker build #724
fix: Propagate CGO_ENABLED environment variable to docker build #724
Conversation
FYI docker images are already built with CGO_ENABLED=0 by default. Relevant config piece: https://github.com/sosedoff/pgweb/blob/master/.github/workflows/release.yml#L10 |
I don't believe that env var it is being passed along to the docker image
|
sorry for missing the env var in the GitHub action, I'm happy to adjust my PR to pass the supplied env var in your GitHub action along to the docker build step |
Hm i thought Actions env vars get propagated to steps without additional configuration, are you saying this is not the case with Pgweb? |
actions environment variables get propagated to the steps however since the build is inside docker it does not inherit them. to handle this I propose we can use the change then which I am happy to make on my branch is to remove the make target that I added and update the Dockerfile/github actions files like so
please let me know whichever method you prefer and I can update this branch accordingly |
You're totally right about the env var propagation. |
186912f
to
d37aedd
Compare
d37aedd
to
e8a6f23
Compare
PR updated to just propagate the environment variable that already exists in the github action |
@sosedoff thanks for merging, do you mind cutting a release so we can utilise the changes in docker behaviour? |
I'll do some testing before cutting a new release but that should not take too long. |
@sosedoff thank you so much and I appreciate your efforts maintaining this great tool |
Description
This PR aims to enable the generation of statically linked binaries for increased portability and ease of deployment. Selfishly we would like to use your upstream docker images and copy the binary across to our internal base image so we can use a tool like dependabot/renovate to keep up to date with the latest version.
Please let me know if you would like this be handled in a different way
Changes
Testing