The module puppetlabs/docker is for installing and managing docker. The Puppet docker module installs, configures, and manages docker from the docker repository.
The module puppetlabs/image_build - Build Docker images from Puppet code
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:
-
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.
-
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.