-
Pull the image from Docker Hub (you only need to do this once):
docker pull evolvedbinary/puppet-lint
-
To run the puppet-lint Docker image to lint all your Puppet files in the current directory:
docker run --rm -v "$PWD:/puppet" evolvedbinary/puppet-lint .
NOTE: The above assumes that you are in the folder containing your Puppet files when you run it.
-
or, to run the puppet-lint Docker image to lint a single Puppet file (named
my-file.pp
) in the current directory:docker run --rm -v "$PWD:/puppet" evolvedbinary/puppet-lint my-file.pp
NOTE: The above assumes that you are in the folder containing your Puppet files when you run it.
If you want to create a shorter alias, you can add this to your ~/.bashrc
, ~/.zshrc
, or ~/.profile
file:
alias docker-puppet-lint='docker run --rm -v "$PWD:/puppet" evolvedbinary/puppet-lint'
When the alias is in-place you can just run docker-puppet-lint
from the folder containing your Puppet files.
If you want to build a new image, you can clone this repositry and build it by running:
git clone https://github.com/evolvedbinary/docker-puppet-lint.git
cd docker-puppet-lint
docker build -t evolvedbinary/puppet-lint:4.2.4 .
docker tag evolvedbinary/puppet-lint:4.2.4 evolvedbinary/puppet-lint:latest
NOTE: You should check the version numbers above match the version numbers in the Dockerfile
first!
To publish the image to Docker Hub, you can run:
docker push evolvedbinary/puppet-lint:4.2.4
docker push evolvedbinary/puppet-lint:latest