-
Notifications
You must be signed in to change notification settings - Fork 212
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
Set CGO_ENABLED=0 for the whole build to be set on all go commands #1249
Conversation
/gcbrun |
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.
Could you put a comment before each occurrence to link to the issue explaining the problem?
Or alternatively could just say something like avoid dynamic linking of libc
.
And two other changes:
- since we’re not linking against libc then we can use the
static
images - distroless now publishes distribution tags (
static-debian11
)
See example here.
/gcbrun |
/gcbrun |
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
ref doc for image change - https://github.com/GoogleContainerTools/distroless/blob/main/base/README.md
static is the right one for use with Go.
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
After #1248, we are still seeing some breakages on the
go mod download
. This sets the variable for the whole build so any call togo
will get the option.