Skip to main content


Supported VersionLanguageWebsite

hadolint is a Dockerfile linter that helps you build best practice Docker images.

Getting Started#

To start using hadolint, enable it in your repository settings.

If you want to customize your hadolint analysis, create a file named .hadolint.yaml and put it into your repository.


Here is a configuration example via sider.yml:

linter:  hadolint:    target: "src/Dockerfile"    ignore: "DL3003"    trusted-registry: ""    config: custom-hadolint.yml

You can use the following options to fine-tune hadolint to your project.

targetstring, string[]**/Dockerfile{,.*}
ignorestring, string[]-
trusted-registrystring, string[]-


This option allows you to specify files or glob patterns to analyze. If you specify some targets, configure as follows:

linter:  hadolint:    target:      - "backend/Dockerfile"      - "images/**/Dockerfile"


This option allows you to ignore some rules from result of analysis. You can specify rules as follows:

linter:  hadolint:    ignore:      - "DL3002"      - "DL3003"

See also the --ignore option.


This option can warn you when images from untrusted repositories are being used in Dockerfiles. If you specify some trusted repositories, configure as follows:

linter:  hadolint:    trusted-registry:      - ""

See also the --trusted-registry option.


This option allow you to specify configuration file in yaml format like this example. If you specify path to configuration file, configure as follows:

linter:  hadolint:    config: custom-hadolint.yml

See also the --config option.