January 2019
Intermediate to advanced
484 pages
11h 48m
English
Docker compose is a tool that enables us to run multiple containers with ease. It's a built-in tool in the Docker CE distribution. All it does is read docker-compose.yml (or .yaml) to run the defined containers. A docker-compose file is a YAML-based template, and it typically looks like this:
version: '3'services: hello-world: image: hello-world
Launching it is pretty simple: save the template to docker-compose.yml and use the docker-compose up command to start it:
$ docker-compose upCreating network "user_default" with the default driverPulling hello-world (hello-world:)......Creating user_hello-world_1 ... doneAttaching to user_hello-world_1hello-world_1 |hello-world_1 | Hello from Docker!hello-world_1 | This ...
Read now
Unlock full access