buildpacks icon indicating copy to clipboard operation
buildpacks copied to clipboard

Why does Google Cloud Buildpacks choose to use ubuntu:22.04 rather than "Distroless" Container Images as the build and run base image?

Open Karibic opened this issue 1 year ago • 1 comments

I wonder know what is the technical considerations behind this decision? Because "Distroless Container Images" project is also from Google and is well known for its security and performance,that aligns well with the security and efficiency goals of serverless platforms.

Karibic avatar Apr 09 '24 03:04 Karibic

Hey good question! GCP's buildpacks are mostly used for Serverless use cases, things like App Engine, Functions, and Cloud Run. This lets us curate the runtime environment to support those developers, and it also means that nobody has to think about writing Dockerfiles! However, one of the tradeoffs of using Buildpacks is that it's not very straightforward for the end user to customize the build or run base images (aka the Stack). To support as many use cases as possible, we curate Stacks with system packages to capture as many use-cases as possible.

We've thought about supporting Distroless container images, but always struggle around the potential UX for the customers. There's open questions around how we would allow you to customize the build and run image, without telling you to just build your own stack.

I'd be curious to know how you'd want to use distroless + Buildpacks...maybe there's a use case that I'm not thinking of!

jama22 avatar Apr 25 '24 18:04 jama22