I\'m not able to find many examples of what a .dockerignore file should look like.
Using puppet to install a few packages on a docker container causes the image to
I think the best solution for your use case is to use a Multi-stage build in your docker file. Your Dockerfile must be in an empty directory, and you run puppet in a disposable container.
From the link above:
With multi-stage builds, you use multiple FROM statements in your Dockerfile. Each FROM instruction can use a different base, and each of them begins a new stage of the build. You can selectively copy artifacts from one stage to another, leaving behind everything you don’t want in the final image.