Using Containers for Distribution
In this chapter, we’ll explore the world of containerization and examine the many reasons why you should use Docker containers for testing and distributing your applications. The term containerization refers to a style of software packaging that makes it simple to deploy and run in any setting. First, we’ll go over the basics of Docker, covered by a simple application that can be built into an image and run as a container. Then, we return to our audiofile application, for a more advanced example, to learn how to create multiple Docker containers that can be composed and run together. These examples give you not only an understanding of the basic flags used for running containers but also some advanced flags that show you how to run containers with mapped network stacks, volumes, and ports.
We also explain how to use Docker containers for integration testing, which increases your confidence, because, let’s face it, mocking API...