Chapter 7.  Running Containers

In previous chapters, we have learned about the Docker architecture, networking, persistent storage, and the structure of Dockerfile. At this point, you should be able to create your own Docker image and start using it. Actually, we did run the containers several times, but without going into details; we are going to do that in this chapter. In this chapter, we are going to focus more on running the containerized software. This will include the following concepts:

  • Container running modes
  • Overriding the CMD and ENTRYPOINT
  • Monitoring containers
  • Exit codes and restart policies
  • Runtime constraints on resources
  • Docker Swarm mode

You will learn how to set up your containers to behave well when running by specifying the restart ...

Get Developing with Docker now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.