17 Optimizing your Docker images for size, speed and security

 

Once you have your apps containerized and working well in a cluster you may think that you're good to go to production - but there are some best practices you still need to invest time in. Optimizing your Docker images is one of the most important, because you need your builds and deployments to be fast, your application content to be secure and you do not want to be paged at 2 a.m. when your servers have run out of disk space. The Dockerfile syntax is small and intuitive, but it hides some complexity which you need to understand to make the most of your image builds. This chapter will take you through the finer details of the image format so you know how and why to optimize it - we'll be building on chapter 3 where we learned that Docker images are actually merged from multiple image layers.

17.1  How you optimize Docker images

 
 
 

17.2  Choosing the right base images

 
 

17.3  Minimizing image layer count and layer size

 
 
 

17.4  Taking your multi-stage builds to the next level

 
 
 
 

17.5  Understanding why optimization counts

 
 
 
 

17.6  Lab

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest