Hadolint
https://github.com/hadolint/hadolint
A smarter Dockerfile linter that helps you build best practice container images.
note
Vortex does not install Hadolint locally. Please follow the instructions to install it on your system.
In CI, Hadolint is installed automatically as part of the pipeline.
Usage
hadolint .docker/*.dockerfile
Ignoring
To ignore all Hadolint rules within a file, place in the file header:
# hadolint global ignore=DL3003,DL3006,SC1035
FROM ubuntu
To ignore only the current and the next line:
FROM ubuntu
# hadolint ignore=DL3003,SC1035
RUN cd /tmp && echo "hello!"
Ignoring fail in continuous integration pipeline
This tool runs in continuous integration pipeline by default and fails the build if there are any violations.
Set VORTEX_CI_HADOLINT_IGNORE_FAILURE environment variable to 1 to ignore
failures. The tool will still run and report violations, if any.