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

Use distroless/static image instead of distroless/base since glibc is not used #133

Open
vilmosmartinek opened this issue Oct 28, 2024 · 1 comment · May be fixed by #134
Open

Use distroless/static image instead of distroless/base since glibc is not used #133

vilmosmartinek opened this issue Oct 28, 2024 · 1 comment · May be fixed by #134
Labels
enhancement New feature or request

Comments

@vilmosmartinek
Copy link
Contributor

What problem are you facing?

This function is using distroless/base-debian as its base image (see here), even though it is quite explicitly not using glibc:

# Most functions don't want or need CGo support, so we disable it.
ENV CGO_ENABLED=0

The documentation of distroless says the following:

Statically compiled applications (Go) that do not require libc can use the gcr.io/distroless/static image, [...]
[...]
Most other applications (and Go apps that require libc/cgo) should start with gcr.io/distroless/base, [...]

Also see related (false positive) security issue: #94.

How could this Function help solve your problem?

It would make sense to change the base image to gcr.io/distroless/static, allowing smaller and safer images.

@vilmosmartinek
Copy link
Contributor Author

Related issue in the template repository: crossplane/function-template-go#87.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant