garethr / garethr-docker

Puppet module for managing docker
Apache License 2.0
397 stars 532 forks source link

Managing images and running containers using hiera? #192

Closed ricoli closed 9 years ago

ricoli commented 9 years ago

Currently there is no puppet class for docker images or containers, so I wonder if there is any way to use hiera configuration to manage them? Afaik we can only use hiera with classes... Any thoughts?

garethr commented 9 years ago

I think this is what you're looking for for containers: https://github.com/garethr/garethr-docker/blob/master/manifests/run_instance.pp

I'd be happy to see a PR for something similar (even better a bunch of examples) for images too.

ricoli commented 9 years ago

Ah yes indeed, I missed that class... yeah could do the same for the images so they can be prefetched.

ricoli commented 9 years ago

Leaving a temporary solution here for the time being - adding this to a manifest:

$dockerImages = hiera('docker::images', {})
create_resources('docker::image', $dockerImages)
garethr commented 9 years ago

Fixed in #194