# Scaling out Distroless adoption With AI

[Grab](https://yomu.fyi/company/grab) · Jia Yee Chong · Jun 22, 2026

## Summary

Grab is transitioning its microservices to Distroless base images to eliminate unnecessary binaries and reduce vulnerability risks, but the migration risks runtime failures from missing shared objects and system utilities. To safely validate container execution in continuous integration without staging dependencies, the team relied on medium tests that run containerized services alongside internal dependencies managed by Testcontainers. Because hundreds of services lacked this test harness, Grab implemented an agentic workflow using Claude Code and Model Context Protocol integrations to inspect repositories, generate test boilerplate, and resolve configuration errors. Once test baselines are established, an automated patch-test-compare pipeline updates Dockerfiles, constructs multi-stage builds for necessary dynamic libraries, and creates draft merge requests for human approval.

## Takeaways

- Medium tests isolate services by mocking external network calls while running unmocked internal dependencies like MySQL using Testcontainers directly within CI.
- The test-generation agent connects to tools like GitLab, Glean, and Sourcegraph via MCP servers and is strictly constrained to modifying only test files and CI configurations.
- The migration process uses a patch-test-compare loop that scans for OS package dependencies, builds multi-stage Dockerfiles to transfer required shared libraries into Distroless runtime images, and flags persistent regressions for human triage.

**Tags:** [CI/CD](https://yomu.fyi/topic/ci-cd), [Docker](https://yomu.fyi/topic/docker), [LLMs](https://yomu.fyi/topic/llm), [Migrations](https://yomu.fyi/topic/migration), [Testing](https://yomu.fyi/topic/testing)

[Read original post](https://engineering.grab.com/scaling-out-distroless-adoption-with-ai)
