Ensure docker_compose builds images if docker-compose.yml changed

asked 2017-01-13 15:47:29 -0600

chaliy gravatar image

I have simple manifest that should instantiate application defined docker-compose.yml. I use https://forge.puppet.com/puppetlabs/d... and my manifest looks like this:

include 'docker'

class {'docker::compose': 
  ensure => present,
}

docker_compose { './docker-compose.yml':
  ensure  => present,
}

One of my services in docker-compose.yml requires build. When I do puppet apply for the first time, it correctly builds images and then run them using docker. Unfortunately, even if something changed, second time puppet apply does nothing.

Is there any way how to force docker_compose to build images from docker-compose.yml file every time I run puppet apply?

edit retag flag offensive close merge delete