A Docker image is a blueprint for a container. The difference between a 2GB image that takes 4 minutes to pull and a 180MB image that pulls in 20 seconds is Dockerfile craftsmanship. At PhonePe and Hotstar, image size and build time directly affect deployment speed and infrastructure cost — a 10-second image pull across 500 deployments per day saves hours and reduces cloud spend.
What This Pillar Covers
- Writing efficient Dockerfiles — layer ordering for cache optimisation, .dockerignore, and build context
- Multi-stage builds — separating build dependencies from runtime to produce minimal production images
- Pushing and pulling images from ECR, Docker Hub, and private registries with authentication
- Image tagging strategies — git SHA tags, semantic versioning, and the immutable artifact promotion pattern
Who This Is For
DevOps engineers and backend developers who build Docker images for production and want smaller, faster, more secure images that deploy reliably across environments.
Why This Matters in Production
At Hotstar, each new release triggers hundreds of parallel deployments. A bloated image delays every one of them. Multi-stage builds cut image sizes by 60–80%, directly reducing ECR storage costs and deployment latency at scale.
Prerequisites
- Docker Fundamentals — running and inspecting containers
- Basic understanding of how applications are compiled or packaged
- Familiarity with a container registry (ECR, Docker Hub)