Puppet+Docker: Rebuild an image with respect to changes in dockerfile

0 votes

I am building a docker image via a dockerfile that i have specified in the manifest file as shown:

docker::image { 'ubuntu':
  docker_file => '/tmp/Dockerfile'
}

How do i rebuild an image pertaining to changes in the docker file? How can i include this in my manifest?

Aug 13 in Puppet by Sam
• 2,500 points
15 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

To rebuild an image, subscribe to external events such as Dockerfile changes by adding the following code to the manifest file:

docker::image { 'ubuntu':
  docker_file => '/tmp/Dockerfile'
  subscribe => File['/tmp/Dockerfile'],
}
file { '/tmp/Dockerfile':
  ensure => file,
  source => 'puppet:///modules/someModule/Dockerfile',
}
answered Aug 13 by Sirajul
• 31,180 points

Related Questions In Puppet

0 votes
1 answer

Is it possible to install puppet agent in a docker container on linux?

Hey @Janice, this is pretty simple. Create ...READ MORE

answered Mar 12 in Puppet by Jason
153 views
0 votes
1 answer

What's the need to integrate docker with puppet?

There are 3 core use cases for integrating docker with Puppet or with ...READ MORE

answered Aug 13 in Puppet by Sirajul
• 31,180 points
23 views
0 votes
0 answers

Puppet+Docker: pull an image and launch a container

I am experimenting on integrating a containerization ...READ MORE

Aug 13 in Puppet by Sam
• 2,500 points
78 views
0 votes
1 answer

Docker with Puppet: DNS allocation to the Docker Daemon

Hey @Dipika, to allocate a dns server ...READ MORE

answered Aug 16 in Puppet by Sirajul
• 31,180 points
21 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,900 points
190 views