Public Repository

Last pushed: 2 years ago
Short Description
Puppet-Agent container.
Full Description


This is a Docker container for the configuration management software, Puppet. It is designed to allow you to quickly mount and run Puppet in a container for testing purposes.


How to Build


git clone
cd docker-puppet/stable/[release]
docker build .

How to Use this Image

Puppet is installed in /opt/puppetlabs as usual and can be freely interacted with. The primary tool locations are as follows:

  • /opt/puppetlabs/puppet/bin/gem
  • /opt/puppetlabs/puppet/bin/facter
  • /opt/puppetlabs/puppet/bin/puppet
  • /opt/puppetlabs/puppet/bin/ruby

Basic Shell

To get this running with a basic interactive shell is straightforward.

docker run --name puppetbox -it frozenfoxx/docker-puppet /bin/bash


You will likely have your own hieradata files you wish to mount. The hiera.yaml configuration file is located in /etc/puppetlabs/puppet/hiera.yaml and by default is configured to look in /etc/puppetlabs/code/hieradata for common.yaml and nodes/%{::trusted.certname}.yaml. You can either mount a local hieradata directory with these files in place or rebuild with a custom hiera.yaml that is configured as you wish.

docker run -it --name puppetbox -v /path/to/custom/hieradata/:/etc/puppetlabs/code/hieradata:rw frozenfoxx/docker-puppet /bin/bash

Puppet Code

Naturally you'll probably want to load your own Puppet code! To do this is simple:

docker run -it --name puppetbox -v /path/to/puppet/code/environments:/etc/puppetlabs/code/environments/production frozenfoxx/docker-puppet /bin/bash

Complete Example

docker run -it --name puppetbox \
  -v /path/to/custom/hieradata/:/etc/puppetlabs/code/hieradata:rw \
  -v /path/to/puppet/code/environments:/etc/puppetlabs/code/environments:ro \
  frozenfoxx/docker-puppet \
Docker Pull Command