We installed the docker-compose binary in the previous section, which means we can now review the actions available to us. docker-compose will provide most of the actions available for Docker because we will execute them on multiple containers at once. Let's review the available docker-compose actions in the following table:
Command |
Definition |
build |
As expected, this action will build or rebuild all docker-compose.yaml file components, or just the selected ones. This action will look for any build keys in our docker-compose.yaml file and launch a build or rebuild. If we set a project name using --project, all images will be created as <project_name>_<service_name> if no image name is defined. If so, this is the name that will be used if we push them to a registry. |
pull/push |
We will be able to push or pull all images at once because we manage all the application components with docker-compose. |
images... |