The Wayback Machine - https://web.archive.org/web/20220223023958/https://github.com/GoogleCloudPlatform/cloudsql-proxy/pull/791
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

fix(containers): use distroless/static as base for default container images #791

Merged
merged 2 commits into from May 11, 2021

Conversation

@enocom
Copy link
Member

@enocom enocom commented May 10, 2021

In addition, this commits ensures we compile a static binary by disabling CGO.

Fix #762.

@enocom
Copy link
Member Author

@enocom enocom commented May 10, 2021

To test this, I ran the proxy both with workload identity and a credentials file in my sample app. In both cases, the proxy connected successfully to the database and my app worked without issue.

In addition, this commits ensures we compile a static binary by
disabling CGO.

Fix #762.
@enocom
Copy link
Member Author

@enocom enocom commented May 10, 2021

A couple points:

The netgo tag isn't needed anymore: https://golang.org/doc/go1.5#net.

Also, I've removed the -w flag. Until we have a need to make smaller binaries, there's no reason to include that change here.

@enocom
Copy link
Member Author

@enocom enocom commented May 10, 2021

Just to be sure, I've run my same experiment again with the latest commit and confirmed it works.

@kurtisvg kurtisvg changed the title fix: change to static base container fix(containers): use distroless/static as base for default container images May 11, 2021
@enocom enocom merged commit d66233e into main May 11, 2021
10 checks passed
@enocom enocom deleted the static branch May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants