Organizing Distributed Solutions with Docker Compose

Shipping software is an integral part of the Docker platform. The official repositories on Docker Hub make it easy to design a distributed solution using tried-and-tested components. In the previous chapter, I showed you how to integrate these components into your own solution, taking a container-first design approach. The end result is a distributed solution with several moving parts. In this chapter, you'll learn how to organize all those moving parts into one unit, using Docker Compose.

Docker Compose is another open source product from Docker, Inc., that extends the Docker ecosystem. The Docker command-line interface (CLI) and Docker API work on individual resources, like images and containers. Docker Compose works at a higher level, with services and applications. An application is a single unit composed of one or more services which are deployed as containers at runtime. You use Docker Compose to define all the resources of the application-services, networks, volumes, and other Docker objects—and the dependencies between them.

There are two parts to Docker Compose. The design-time element captures the application definition in a markup file using a YAML specification, and at runtime Docker Compose can manage an application from the YAML file. We'll cover both in this chapter:

  • Defining applications with Docker Compose
  • Managing applications with Docker Compose
  • Configuring application environments
Docker Compose is installed as part of Docker Desktop on Windows. If you install Docker on Windows Server using the PowerShell installer, that doesn't give you Docker Compose. You can download it from the releases on GitHub at docker/compose.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.189.251