concept Compose in category docker

appears as: Compose, Compose
Learn Docker in a Month of Lunches

This is an excerpt from Manning's book Learn Docker in a Month of Lunches.

You could run this app with Compose, and it would start a single container to get to the desired state. Figure 7.1 shows the architecture diagram of the app’s resources.

Figure 10.8 You need to use the same files and project name to manage an application with Compose.
# change to the numbers directory
 
 # (this is done with the context setting in Compose):
 cd ch11/exercises/numbers
 
 # build the image, specifying the Dockerfile path and a build argument:
 docker image build -f numbers-api/Dockerfile.v4 --build-arg BUILD_TAG=ch11 -t numbers-api .
 
 # check the labels:
 docker image inspect -f '{{.Config.Labels}}' numbers-api
Docker in Action, Second Edition

This is an excerpt from Manning's book Docker in Action, Second Edition.

This chapter is not an exhaustive survey of Compose or the properties you will use to manage services. The official Docker documentation should serve that purpose. Expect to find every command-line feature mirrored in Compose. The next section is a brief primer on YAML and Compose files.

You can change service network attachment or the networks Docker creates for a stack with Compose. Compose can create networks with specific names, types, driver options, or other properties. Working with networks is similar to volumes. There are two parts: a top-level networks property that includes network definitions, and a networks property of services, where you describe attachments. Consider this final example: