-
Notifications
You must be signed in to change notification settings - Fork 338
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
chore: add docker-build target to Makefile with support for configurable build flags #4893
Conversation
Way to use build flag when creating docker image:
|
If we needed to support other flags defined in the makefile here as well, we would end up maintaining variables in 2 places. makefile
Then use it with the build arg as you suggested |
we could add this to Makefile:
And if we locally have Another way would be that we have a new target in Makefile that will be responsibile for building the image itself:
And this is example how it can be used:
|
I would vote on this option. having .env variable is error prone between builds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
Please rename the PR title
@acha-bill @nugaon The only idea I have now is back to docker build arguments. @darkobas2 do you have any other better idea? |
Maybe instead of separate image i would suggest to just build and add an additional binary into the image.... And then it can be chosen at will |
6c4f361
to
6d7a557
Compare
I discovered an issue when deploying the cluster locally using beelocal. Locally, it always uses the default values defined in the Makefile, whereas on CI, it works as expected, passing the values correctly. To address this issue and allow building the image with REACHABILITY_OVERRIDE_PUBLIC and BATCHFACTOR_OVERRIDE_PUBLIC, I made the PR in beelocal repo. Additionally, the old Dockerfile has been left intact so that users can still build the image in the previous way if needed. These updates should ensure that local deployments work the same way as on CI. Default Values:
How to Use:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Checklist
Description
This PR introduces a new target, docker-build, in the Makefile, allowing for configurable build flags when creating the Docker image. Specifically, users can now set the REACHABILITY_OVERRIDE_PUBLIC and IMAGE flags, along with other flags as needed, when building the image.
Example of usage:
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):