How do apply Puppet class locally

So I have a Puppet configuration that I would like to use to configure Docker
images but I’m not sure how to apply them locally.

My goal is to hopefully do something like:

  • blktrace output error in docker container
  • Different file owner inside Docker container and in host machine
  • DevOps: automatically restarting a failed container
  • Developing Puppet locally using Vagrant + Docker
  • Working monitoring solution for Docker Containers and Swarm?
  • What is the best way to use different environments with Docker Swarm?
  • RUN puppet apply -e "roles::database"

    In my Dockerfile.

    For example I might have a manifest that I want to apply that contains
    something like:

    class roles::database {
        include ::profiles::base

    But when I go:

    puppet apply -e "roles::database"

    I get:

    Could not parse for environment production: Syntax error at end of file at line 1 on node.

    Could someone point me in the right direction?

  • Stopping prometheus docker container gracefully
  • Docker python client API copy
  • Symfony3 fetch wrong data from database
  • EC2 Container Service Networking
  • Docker+Mesos+Marathon on windows 7/8/10
  • Connect java application to YouTube Vitess database
  • One Solution collect form web for “How do apply Puppet class locally”

    Please check the following examples.

    First – ensure your module path is set correctly. You can provide modulepath as a parameter to apply.

    Second – "roles::database" is not a piece of Puppet code.

    Try this:

    puppet apply -e "include roles::database"


    puppet apply --modulepath=/path_to_modules -e "include roles::database"
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.