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:

  • Dockerfile entrypoint script arguments in docker run
  • Using custom shell script as docker entrypoint
  • Deploying multiple Deis clusters
  • docker enterprise solution?
  • Docker : multiples linked containers for each customers
  • How does horizontal scaling decrease load of a system?
  • 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?

  • How to execute host's Docker command from container?
  • how to install glib2 package in docker
  • Consul docker - advertise flag ignored
  • docker-compose: where to store configuration for services?
  • couldn't run docker when mount volume
  • How to hide SSH key to the Docker image without leaving the trace?
  • 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.