Making our first Docker Compose application
As part of our installation of Docker for Mac, Docker for Windows, and Docker on Linux in Chapter 1, Docker Overview, we installed Docker Compose, so rather than discussing what it does any further, let's try to bring up the two-container application we launched manually at the end of the last chapter, using just Docker Compose.
As already mentioned, Docker Compose uses a YAML file, typically named docker-compose.yml
, to define what your multi-container application should look like. The Docker Compose representation of the two-container application we launched in Chapter 4, Managing Containers is as follows:
version: "3.7" services: redis: image: redis:alpine volumes: - redis_data:/data restart...