- 
Docker Compose describes a set of containers in YAML format and runs a command to build and run those containers.
 
- 
Included in the docker module is the docker_compose type. 
 
- 
This enables Puppet to run Compose and remediate any issues to ensure reality matches the model in your Compose file.
 
- 
Before you use the docker_compose type, you must install the Docker Compose utility.
 
- 
To install Docker Compose, add the following code to the manifest file:
 
class {'docker::compose':
  ensure => present,
  version => '1.9.0',
}
compose_test:
  image: ubuntu:14.04
  command: /bin/sh -c "while true; do echo hello world; sleep 1; done"
- 
Specify the file resource to add a Compose file to the machine you have Puppet running on. 
 
- 
To define a docker_compose resource pointing to the Compose file, add the following code to the manifest file:
 
docker_compose { 'test':
  compose_files => ['/tmp/docker-compose.yml'],
  ensure  => present,
}