Sitemap
Shant Khayalian

Shant Khayalian

Software Architect | Founder @ Balian’s Deep Tech Studio Writing about Spring Boot, software architecture, microservices, AI, and scalable backend systems.

Member-only story

Docker Still Worth It for Spring Boot? Comparing Distroless, Jib, and Slim Images

3 min readApr 21, 2025

--

Press enter or click to view image in full size
Shant Khayalian — Balian’s IT
Shant Khayalian — Balian’s IT

Bob’s Story: The Container Burger Problem

Bob was preparing burgers at his food truck.
He used to pack every burger with everything — sauces, extra boxes, even the entire kitchen sink.

People loved it. But…

  • Storage costs exploded
  • Deliveries slowed down
  • And the health inspector wasn’t impressed by leftover shell scripts in the packaging

“Do I really need all this junk in my containers?”
That’s when Bob discovered
Distroless, Jib, and Slim Docker Images for Spring Boot.

Just like a burger — the leaner, the cleaner.

What’s the Problem with Default Spring Boot Docker Images?

Most devs do this:

FROM openjdk:17-jdk
COPY target/app.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]

But this:

  • Includes full OS (bash, curl, even unused libs)
  • Leads to huge images (~300MB+)
  • Has attack surface (more binaries = more risk)

--

--

Shant Khayalian
Shant Khayalian

Written by Shant Khayalian

Software Architect | Founder @ Balian’s Deep Tech Studio Writing about Spring Boot, software architecture, microservices, AI, and scalable backend systems.