Skip to content

callum-ryan/cfn-lint-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Run latest version of cfn-lint in a Docker container

Setup

$ export API_TOKEN=123456789abcdefg
$ build.sh rebuild

On a mac, greadlink needs to be installed - which is in coreutils:

$ brew install coreutils

Put this in .bashrc or .zshrc to run almost natively

cfn-lint(){
    local file=${*: -1}
    local lfile
    lfile=$(greadlink -m "$(pwd)/${file}")
    local rfile
    rfile=$(greadlink -m "/$(basename "$file")")
    docker run -it --rm \
        -v "${lfile}:${rfile}" \
        --log-driver none \
        --name cfn-lint \
        cfn-lint "$rfile"
}

Usage

 $ cfn-lint template.yaml

Releases

No releases published

Packages

No packages published