---
title: "Comment by Kartik N V J K on \"Docker Explained In Gen-Z So Your Code Stops Getting Cooked \" | Hashnode"
description: "The python:3.10-slim base is the right call for a prediction API, and it's worth spelling out why, because the full image drags in build tooling you never touch"
url: "https://hashnode.com/posts/docker-explained-in-gen-z-so-your-code-stops-getting-cooked/6a62681489bf85f6b42894c2/comment/6a63818cd1edf6ee94a916c2"
---

[Discussion](https://hashnode.com/posts/docker-explained-in-gen-z-so-your-code-stops-getting-cooked/6a62681489bf85f6b42894c2)

Comment [Docker Explained In Gen-Z So Your Code Stops Getting Cooked](https://hashnode.com/posts/docker-explained-in-gen-z-so-your-code-stops-getting-cooked/6a62681489bf85f6b42894c2)

[Kartik N V J K](https://hashnode.com/@kartik-nvj)

[Jul 24](https://hashnode.com/posts/docker-explained-in-gen-z-so-your-code-stops-getting-cooked/6a62681489bf85f6b42894c2/comment/6a63818cd1edf6ee94a916c2)

The python:3.10-slim base is the right call for a prediction API, and it's worth spelling out why, because the full image drags in build tooling you never touch at runtime and just widens the attack surface. Copying requirements and running pip install before the app code, like you show, is the caching trick that saves the most rebuild time. Are you pinning exact versions in requirements, or leaving them open for the latest patch?

[Eva J Patel](https://hashnode.com/@evapatel123)

[Jul 24](https://hashnode.com/posts/docker-explained-in-gen-z-so-your-code-stops-getting-cooked/6a62681489bf85f6b42894c2/comment/6a63818cd1edf6ee94a916c2#reply-6a63cce831beb3d3ddc450ad)

Thanks! I'm glad you noticed that! Yes, I generally pin exact package versions in requirements.txt to keep builds reproducible and avoid unexpected changes from upstream updates. It makes deployments much more predictable, especially when collaborating with others or moving between environments.
