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 in Puppet by Karan
• 6,060 points
27 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 by Sirajul
• 39,540 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
740 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 in Puppet by Yesha
53 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 in Puppet by Jason
184 views
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,940 points
235 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 in Puppet by Sirajul
• 39,540 points
143 views