Forrest logo
back to the hadolint tool

hadolint:tldr:81917

hadolint: Lint a Dockerfile ignoring specific rules.
$ hadolint --ignore ${DL3006} --ignore ${DL3008} ${path-to-Dockerfile}
try on your machine

This command is using the tool "hadolint" to perform a static analysis or linting of a Dockerfile. Hadolint is commonly used to identify potential issues or best practices violations in Dockerfiles.

The specific command includes the following components:

  • hadolint: Refers to the command or executable name of the tool "hadolint".
  • --ignore ${DL3006}: Instructs hadolint to ignore a specific linting rule with the ID DL3006. Linting rules are predefined checks that hadolint performs on Dockerfiles.
  • --ignore ${DL3008}: Instructs hadolint to ignore a different specific linting rule with the ID DL3008.
  • ${path-to-Dockerfile}: Specifies the file path to the Dockerfile you want to analyze with hadolint. You need to replace ${path-to-Dockerfile} with the actual path or location of your Dockerfile.

Overall, this command runs hadolint on a Dockerfile, but it additionally tells hadolint to exclude the rules DL3006 and DL3008 from its linting process.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the hadolint tool