Chapter 11. Plain sailing—Docker in production and operational considerations
This chapter covers
- Options for logging container output
- How to monitor your running containers
- Managing your containers’ resource usage
- Using Docker’s capabilities to help manage traditional sysadmin tasks
In this chapter we’re going to cover some of the subjects that come up when running in production. Running Docker in production is a big subject, and production use of Docker is still an evolving area. Many major tools are in the early stages of development and were changing as we wrote this book. For example, while we were writing this chapter, Kubernetes went to version 1.0 and a revamped Registry was released by Docker.
In this chapter we focus on showing you some of the key things you should consider when going from volatile environments to stable ones.
When you run Docker in production, one of the first things you’ll want to consider is how to track and measure what your containers are up to. In this section you’re going to learn how you can get an operational view of both your live containers’ logging activity and their performance.
This is still a developing aspect of the Docker ecosystem, but some tools and techniques are emerging as more mainstream than others. We’ll look at redirecting application logs to the host’s syslog, at redirecting the output of the docker logs command to a single place, and at Google’s container-oriented performance monitoring tool, cAdvisor.