This is a docker image that simply encapsulates cfn-lint in a docker image.
cat cloudformation.template | docker run --rm -i solidyn/cfn-lint -
This sends the template content through docker, and cfn-lint reads it from stdin. Easy. This can also be put in a CI pipeline to not have to deal with Python environments and packages in those cases.
docker run --rm -v $(pwd):/app solidyn/cfn-lint /app/clouformation.template /app/cf2.template
This bind mounts your current working directory into /app inside the container. Then, you can have cfn-lint scan any files you want, as well as pass other options to cfn-lint if you require them.
Bottom line, is the entrypoint of this container is /usr/local/bin/cfn-lint, so you can treat it like an executable in how you invoke it.
In your .bash_profile:
alias cfn-lint='docker run -rm -it solidyn/cfn-lint'
In a bin directory on your path:
file cfn-lint
#!/usr/bin/env bash
docker run --rm -it -v $(PWD):/app solidyn/cfn-lint "$@"
Then, make it executable with chmod +x cfn-lint
Content type
Image
Digest
Size
358.3 MB
Last updated
over 6 years ago
docker pull solidyn/cfn-lint