A different way of doing it, creating a smaller image, is to run librarian-puppet in the host, not in Docker, so you don't end with librarian, ruby, gems,... installed in the image.
I ended with a 622MB image for jenkins slave using Puppet, and a 480MB image without Puppet.