Puppet Building docker images from Puppet

0 votes
How can I build docker images from puppet? Is there any feature available in puppet for this purpose?
Aug 20, 2019 in Puppet by Karan
• 19,610 points
1,131 views

1 answer to this question.

0 votes

Yes, Puppet has a module called puppetlabs/image_build that can be downloaded from Puppet forge.

The basic purpose of image_build is to enable building various images, including Docker images, from Puppet code. There are two main cases where this can be useful:

  1. You have an existing Puppet codebase and you're moving some of your services to using containers. By sharing the same code between container and non-container based infrastructure you can cut down on duplication of effort, and take advantage of work you've already done.

  2. You're building a lot of images, but scaling Dockerfile means either a complex hierachy of images or copy-and-pasting snippets between many individual Dockerfiles. image_build allows for sharing common functionality as Puppet modules, and Puppet itself provides a rich domain-specific language for declarative composition of images.

Setup:

puppetlabs/image_build is a Puppet Module and is available on the Forge.

The following should work in most cases:

puppet module install puppetlabs/image_build

You don't need any additional gems installed unless you are looking to work on developing the module. All you need is a working Docker environment or acbuild, for which I'd recommend Docker for Mac or Docker for Windows or just installing Docker if you're on Linux.

For further understanding refer to: https://forge.puppet.com/puppetlabs/image_build

answered Aug 20, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

+1 vote
1 answer

Steps to trigger puppet agent from jenkins

Heyy @Hannah,  First, you need to create Jenkins slave, ...READ MORE

answered Dec 16, 2018 in Puppet by Kiyara
4,029 views
0 votes
0 answers
0 votes
1 answer

How do I install Puppet directly from the source?

Hey @Laksha,  First, install the Puppet tarball from ...READ MORE

answered Mar 8, 2019 in Puppet by Yesha
802 views
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, 2019 in Puppet by Jason
1,531 views
+2 votes
1 answer
+2 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
• 58,020 points
2,739 views
0 votes
1 answer

Puppet in Docker : Building a Puppet environment in docker.

You can run your Puppet infrastructure on ...READ MORE

answered Aug 19, 2019 in Puppet by Sirajul
• 59,230 points
1,321 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP