distroless icon indicating copy to clipboard operation
distroless copied to clipboard

Proposal: Ruby 3.4.5 Distroless Example

Open michael-lins opened this issue 4 months ago • 2 comments

Context

  • Back in January 2018, Issue #156 asked: “Add a Ruby distroless?” That request was closed without resolution. (#156)
  • Community members have created proof-of-concept images showing Ruby works on Distroless, including:
    • junminhong/ruby-distroless (supports Ruby 2.5–3.4, amd64 & arm64)
    • Other community attempts like unasuke/distroless-ruby and lstn/distroless
  • This demonstrates that Ruby can run on Distroless, but the official repo has no scoped example.

Proposal

Introduce a scoped example under examples/ruby/, including:

  • Multi-stage Dockerfile:
    • Builder stage installs Ruby 3.4.5 and dependencies
    • Runtime stage uses gcr.io/distroless/base-debian12:nonroot
  • Minimal app.rb that prints Hello from Ruby 3.4.5
  • README.md documenting build and run instructions
  • Update examples/README.md to acknowledge the new Ruby example

Why

  • Demonstrates feasibility in a low-maintenance, transparent context
  • Serves as a foundation for potential future Bazel-backed official images
  • Low-risk contribution: no disruption to existing runtime images

Next Steps

Would the maintainers be open to reviewing a PR implementing this example?

michael-lins avatar Aug 25 '25 00:08 michael-lins

Nice, forked it and just started working on the PR! Planning to send it next week.

michael-lins avatar Sep 04 '25 05:09 michael-lins

so putting this in examples is probably fine, I don't see us adding a ruby build though to our releases.

loosebazooka avatar Sep 04 '25 17:09 loosebazooka