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

Set CGO_ENABLED=0 for the whole build to be set on all go commands #1249

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

j-windsor
Copy link
Contributor

After #1248, we are still seeing some breakages on the go mod download. This sets the variable for the whole build so any call to go will get the option.

@j-windsor j-windsor requested a review from a team as a code owner June 16, 2023 14:01
@j-windsor
Copy link
Contributor Author

/gcbrun

@j-windsor j-windsor requested a review from iennae June 16, 2023 14:11
Copy link
Member

@briandealwis briandealwis left a 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.

@j-windsor
Copy link
Contributor Author

/gcbrun

@j-windsor j-windsor requested a review from briandealwis June 16, 2023 15:55
@j-windsor
Copy link
Contributor Author

/gcbrun

Copy link
Contributor

@iennae iennae left a 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.

Copy link
Member

@briandealwis briandealwis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iennae iennae merged commit 71d953f into v1 Jun 16, 2023
@iennae iennae deleted the disableCgoForAll branch June 16, 2023 18:21
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

Successfully merging this pull request may close these issues.

3 participants