Summary
This chapter has seen us go through a lot of theory as well as some in-depth work on exercises. We started the chapter by looking at how our running Docker containers utilize the host system's CPU, memory, and disk resources. We looked at the ways in which we can monitor how these resources are consumed by our containers and configure our running containers to reduce the number of resources used.
We then looked at the Docker best practices, working through a number of different topics, including utilizing base images, installing programs and cleanup, developing your underlying application for scalability, and configuring your applications and images. We then introduced some tools to help you enforce these best practices, including hadolint
and FROM:latest
to help you lint your Dockerfiles
, and dcvalidator
to check over your docker-compose.yml
files.
The next chapter takes our monitoring skills up another level as we introduce using Prometheus to monitor our container...