Hadolint
Dockerfile linter, validate inline bash, written in Haskell
Curl example
curl -X POST localhost/api/v1/scan/import/ -H "Authorization: Token a75bb26171cf391671e67b128bfc8ae1c779ff7b" -H "Content-Type: multipart/form-data" -F "file=@./" -F "product_name=Product1" -F "product_type=Application" -F "scanner_name=Hadolint Dockerfile check" -F "branch=dev" {
"line":1,"code":"DL3006","message":"Always tag the version of an image explicitly",
"column":1,"file":"./test/smoke/Dockerfile","level":"warning"
},
{
"line":3,"code":"DL3018","message":"Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`",
"column":1,"file":"./test/smoke/Dockerfile","level":"warning"
},
{
"line":3,"code":"DL3019","message":"Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages",
"column":1,"file":"./test/smoke/Dockerfile","level":"info"
}
]
Last updated