-
Notifications
You must be signed in to change notification settings - Fork 850
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 build information when to build in docker #782
Conversation
Signed-off-by: cwen0 <[email protected]>
Signed-off-by: cwen0 <[email protected]>
|
||
COPY . /src | ||
WORKDIR /src | ||
RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
make binary | ||
IMG_LDFLAGS=$LDFLAGS make binary |
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.
Why not name "IMG_LDFLAGS" as "LDFLAGS" directly?
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.
We need to reference IMG_LDFLAGS
to LDFLAGS
in Makefile, If we use LDFLAGS
directly, an error will be report when compiling:
Recursive variable `LDFLAGS' references itself (eventually). Stop.
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
/merge |
/run-all-tests |
* fix build information when to build in docker Signed-off-by: cwen0 <[email protected]> * make good Signed-off-by: cwen0 <[email protected]> Co-authored-by: ti-srebot <[email protected]>
Signed-off-by: cwen0 [email protected]
What problem does this PR solve?
Fix:
Fixed:
What is changed and how does it work?
Add a build-arg