{"id":3365,"date":"2026-11-21T07:59:05","date_gmt":"2026-11-21T07:59:05","guid":{"rendered":"https:\/\/www.rajeshkumar.xyz\/blog\/?p=3365"},"modified":"2026-11-21T08:01:05","modified_gmt":"2026-11-21T08:01:05","slug":"platform-team-capped-container-images-case-study","status":"publish","type":"post","link":"https:\/\/www.rajeshkumar.xyz\/blog\/platform-team-capped-container-images-case-study\/","title":{"rendered":"A Platform Team Capped Its Container Images: A Case Study"},"content":{"rendered":"<p>This case study follows a fictional platform team inside a growing software company. The details are invented, but the pattern is assembled from problems that many engineering groups describe: container images that grew quietly, builds that crawled, and a registry nobody wanted to look inside. The team&#8217;s response was a creative limit, a hard cap on image size and on the number of packages installed, set before any optimisation work began. Here is what they found, written in the order they found it, with attention to evidence rather than enthusiasm.<\/p>\n<h2>The starting position<\/h2>\n<p>The team maintained a shared base image that dozens of services built upon. Over time every request to add a tool had been granted, since each seemed reasonable alone. The result was a heavy image containing compilers, debugging tools and several language runtimes that most services never used. Pulls from the registry were slow, deployments waited on layers, and security scans produced long reports full of findings in packages no service needed.<\/p>\n<p>No one had decided to create this situation. It emerged from the absence of any boundary. The team lead, a calm and methodical person, asked a simple question at a planning session: if we had to fit this image under a fixed size, what would we keep?<\/p>\n<h2>Setting the limit<\/h2>\n<p>The team settled on two rules and pinned them to the top of the repository&#8217;s readme. First, the base image must stay under a size ceiling chosen at roughly half of its current weight. Second, the package list must be explicit and short, with a written reason beside every entry. They did not choose these numbers by science. They chose a target that felt uncomfortable but possible, accepting that it might need adjustment.<\/p>\n<p>Crucially, they also defined how they would judge the result. They listed four measures: image size, pull time on a clean machine, number of findings in the vulnerability scan, and the number of service teams reporting breakage. Baselines were recorded before any change.<\/p>\n<h2>What the limit exposed<\/h2>\n<p>The first discovery was that most packages had no owner. Asked who needed a particular tool, nobody could say. Entries marked with a reason were quickly justified; the rest went into a candidate-for-removal list. The act of writing a reason beside each line revealed how much of the image was inherited habit.<\/p>\n<p>The second discovery was that build tools and runtime tools were mixed together. Compilers and package managers are needed to build software, not to run it. Separating the two into different stages, so that the final image carries only what the application needs at runtime, accounted for the largest single reduction. Readers who want more background on image hygiene will find the article on <a href=\"https:\/\/www.rajeshkumar.xyz\/blog\/master-docker-image-management-best-practices-for-engineering-teams\/\">managing container images with sound practice<\/a> a helpful complement.<\/p>\n<p>The third discovery was uncomfortable: several services depended on tools that were present only by accident. When those tools were removed, builds failed, and the failures pointed directly at undeclared dependencies. The team treated these failures as useful evidence, because they showed which assumptions had been invisible.<\/p>\n<h2>How the work was organised<\/h2>\n<p>The team ran the effort as a short series of small, reversible steps rather than one large rewrite. Each step removed a group of packages, rebuilt the image, and ran the existing test suites for a sample of services. If a test failed, the change was rolled back and the failure was logged with the missing dependency. This approach kept risk low, and it produced a growing list of documented requirements that later became the package manifest.<\/p>\n<p>Communication mattered as much as the technical work. The lead posted a brief weekly note to all service teams stating what had been removed, what had broken and what would come next. The notes were short, plain and consistent, and service teams said later that predictability made the disruption easier to accept.<\/p>\n<h2>The trade-offs they faced<\/h2>\n<p>The limit was not free. Developers lost the convenience of finding a familiar debugging tool inside every container, which made troubleshooting in production slightly more awkward. The team responded by providing a separate debug image, used only when needed, which kept convenience available without making it the default.<\/p>\n<p>There was also a cost in coordination. Service teams had to learn the new base, update their build definitions, and sometimes rewrite scripts that assumed a larger environment. The platform team ran short drop-in sessions and published a migration guide. Not everyone was pleased, and the lead recorded the objections alongside the results so that they would not be lost.<\/p>\n<h2>How they measured the outcome<\/h2>\n<p>After the change, the team repeated the four measurements against the recorded baselines. The image was substantially smaller, pulls from a clean machine were faster, and the scan reported fewer findings, largely because removed packages could no longer generate them. The count of service teams reporting breakage was higher in the first week and then fell as fixes landed. The team reported this honestly, including the early spike.<\/p>\n<p>They did not claim that the limit alone caused every improvement. Other changes were happening at the same time, such as routine updates and the arrival of a new scanning tool. The team noted that attribution was imperfect and listed the confounding changes beside the results. That small act of candour made their report more credible to sceptical colleagues.<\/p>\n<h2>Hindsight<\/h2>\n<p>In retrospect the group named three improvements. They would have involved service teams earlier, before choosing the size target. They would have set up the debug image before announcing the cap. And they would have scheduled periodic reviews of the limit instead of treating it as permanent. Pipelines were a related theme; for a view of how container tooling supports automated delivery, a post on <a href=\"https:\/\/www.rajeshkumar.xyz\/blog\/fast-cloud-shipping-tools-how-docker-supports-ci-cd-pipeline-automation\/\">the role Docker plays in automated build-and-release pipelines<\/a> offers useful framing, and a rundown of <a href=\"https:\/\/www.rajeshkumar.xyz\/blog\/common-docker-mistakes-beginners-should-avoid\/\">frequent beginner slips with Docker<\/a> overlaps with several of the team&#8217;s discoveries.<\/p>\n<h2>A short analytical note on attribution<\/h2>\n<p>Case studies like this one invite a tidy story, so it is worth stating what the evidence can and cannot support. A before-and-after comparison on one platform cannot show that a cap is the cause of better performance in general. It shows what happened here, under these conditions. To strengthen confidence, a team could apply the limit to one group of services first and compare against a similar group without it, though the practicalities of a shared base image make that difficult. Short of a controlled comparison, honest reporting of context is the best a team can do.<\/p>\n<h2>Lessons you can apply<\/h2>\n<ol>\n<li>Choose a limit that is measurable, such as size or package count, so that progress is visible.<\/li>\n<li>Record baselines before changing anything, and decide which measures matter in advance.<\/li>\n<li>Require a written reason for every item that survives the cap.<\/li>\n<li>Provide an escape hatch, like a separate debug image, so that the limit does not block legitimate work.<\/li>\n<li>Report results honestly, including early setbacks and confounding changes.<\/li>\n<\/ol>\n<h2>An aside on learning from other fields<\/h2>\n<p>Engineers sometimes find fresh ideas by looking at unrelated communities. Hobby groups are full of people making clever use of limited gear, and sites devoted to them can be a pleasant source of perspective. <a href=\"https:\/\/dronesnow.in\/\">A drone-themed website<\/a> that, in its own words, has pages for pilots, institutes and drone models as well as a shop and discussion areas is one such place. The relevance for platform work is modest but real: a shared limit, such as a fixed parts list, can focus a community just as an image cap focuses a team.<\/p>\n<h2>Closing observations<\/h2>\n<p>The platform team&#8217;s story does not prove that every organisation should adopt a size cap. It does illustrate a general point: a limit chosen deliberately exposes hidden assumptions, forces decisions that had been avoided, and gives a team something concrete to measure. Treat the cap as an experiment with a stated hypothesis, check the evidence honestly, and be ready to adjust. That is what turned a heavy, unloved image into something the team could explain and defend.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A fictional platform team sets a hard size cap on its container images. The case study tracks what the limit exposed, what changed and how to measure the result.<\/p>\n","protected":false},"author":6,"featured_media":3366,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[713],"tags":[],"series":[],"class_list":["post-3365","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops-careers"],"_links":{"self":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/comments?post=3365"}],"version-history":[{"count":1,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3365\/revisions"}],"predecessor-version":[{"id":3433,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/posts\/3365\/revisions\/3433"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/media\/3366"}],"wp:attachment":[{"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/media?parent=3365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/categories?post=3365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/tags?post=3365"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.rajeshkumar.xyz\/blog\/wp-json\/wp\/v2\/series?post=3365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}