OS Manuals

/usr/bin/hadolint

Haskell Dockerfile Linter

From hadolint 2.15.1-r0 (enterprise-packages), captured 2026-11-08 by running hadolint --help (exit 0). permalink

hadolint - Dockerfile Linter written in Haskell

Usage: hadolint [-v|--version] [-c|--config FILENAME] [DOCKERFILE...]
                [--file-path-in-report FILEPATHINREPORT] [-o|--output OUTPUT]
                [--no-fail] [--no-color] [-V|--verbose] [-f|--format ARG]
                [--error RULECODE] [--warning RULECODE] [--info RULECODE]
                [--style RULECODE] [--ignore RULECODE]
                [--trusted-registry REGISTRY (e.g. docker.io)]
                [--require-label LABELSCHEMA (e.g. maintainer:text)]
                [--strict-labels] [--disable-ignore-pragma]
                [-t|--failure-threshold THRESHOLD]

  Lint Dockerfile for errors and best practices

Available options:
  -h,--help                Show this help text
  -v,--version             Show version
  -c,--config FILENAME     Path to the configuration file
  --file-path-in-report FILEPATHINREPORT
                           The file path referenced in the generated report.
                           This only applies for the 'checkstyle',
                           'codeclimate', 'sonarqube', 'junit' and
                           'gitlab_codeclimate' formats and is useful when
                           running Hadolint with Docker to set the correct file
                           path.
  -o,--output OUTPUT       Output destination file
  --no-fail                Don't exit with a failure status code when any rule
                           is violated
  --no-color               Don't colorize output
  -V,--verbose             Enables verbose logging of hadolint's output to
                           stderr
  -f,--format ARG          The output format for the results [tty | json |
                           checkstyle | codeclimate | gitlab_codeclimate | gnu |
                           codacy | sonarqube | sarif | junit] (default: tty)
  --error RULECODE         Make the rule `RULECODE` have the level `error`
  --warning RULECODE       Make the rule `RULECODE` have the level `warning`
  --info RULECODE          Make the rule `RULECODE` have the level `info`
  --style RULECODE         Make the rule `RULECODE` have the level `style`
  --ignore RULECODE        A rule to ignore. If present, the ignore list in the
                           config file is ignored
  --trusted-registry REGISTRY (e.g. docker.io)
                           A docker registry to allow to appear in FROM
                           instructions
  --require-label LABELSCHEMA (e.g. maintainer:text)
                           The option --require-label=label:format makes
                           Hadolint check that the label `label` conforms to
                           format requirement `format`
  --strict-labels          Do not permit labels other than specified in
                           `label-schema`
  --disable-ignore-pragma  Disable inline ignore pragmas `# hadolint
                           ignore=DLxxxx`
  -t,--failure-threshold THRESHOLD
                           Exit with failure code only when rules with a
                           severity equal to or above THRESHOLD are violated.
                           Accepted values: [error | warning | info | style |
                           ignore | none] (default: info)
Options (17)
OptionDescriptionSource
-h, --helpShow this help texthelp
-v, --versionShow versionhelp
-c, --config FILENAMEPath to the configuration filehelp
--file-path-in-report FILEPATHINREPORTThe file path referenced in the generated report.help
-o, --output OUTPUTOutput destination filehelp
--no-failDon't exit with a failure status code when any rule is violatedhelp
--no-colorDon't colorize outputhelp
-V, --verboseEnables verbose logging of hadolint's output to stderrhelp
-f, --format ARGThe output format for the results [tty | json | checkstyle | codeclimate | gitlab_codeclimate | gnu | codacy | sonarqube | sarif | junit] (default: tty)help
--error RULECODEMake the rule `RULECODE` have the level `error`help
--warning RULECODEMake the rule `RULECODE` have the level `warning`help
--info RULECODEMake the rule `RULECODE` have the level `info`help
--style RULECODEMake the rule `RULECODE` have the level `style`help
--ignore RULECODEA rule to ignore.help
--strict-labelsDo not permit labels other than specified in `label-schema`help
--disable-ignore-pragmaDisable inline ignore pragmas `# hadolint ignore=DLxxxx`help
-t, --failure-threshold THRESHOLDExit with failure code only when rules with a severity equal to or above THRESHOLD are violated.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.