Hadolint
https://github.com/hadolint/hadolint
A smarter Dockerfile linter that helps you build best practice container images.
Vortex does not install Hadolint locally. Follow the instructions to install it on your system.
In CI, Hadolint runs from its official Docker image.
Hadolint is selected by default during installation. Deselecting it in the
Development tools question removes the continuous integration step from every
supported provider. The hadolint ignore= directives in the Dockerfiles are
kept, so the tool still works when run by hand.
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 rules for the next instruction only:
FROM ubuntu
# hadolint ignore=DL3003,SC1035
RUN cd /tmp && echo "hello!"
Ignoring fail in continuous integration pipeline
This tool runs in the continuous integration pipeline by default and fails the build if there are any violations.
Set the VORTEX_CI_HADOLINT_IGNORE_FAILURE environment variable to 1 to
ignore failures. The tool will still run and report violations, if any.