DL3055 · hadolint/hadolint Wiki · GitHub
Skip to content
Moritz Röhrich edited this page Mar 23, 2021 · 3 revisions

Label <label> is not a valid git hash.

This rule is activated by specifying a label-schema including a label of type hash. This can be done via command line

$ hadolint --require-label refno:hash Dockerfile

or in the config file:

label-schema:
  refno: hash

Problematic code:

LABEL refno="abc-not-a-git-hash-def"

Correct code:

LABEL refno="0ef48a1"

Rationale:

Some standards require a source control identifier be specified for the software within an image.

Note:

This rule does not expand variables. It requires the value of a label to be a literal git hash, though both short (7-digit) and long (40-digit) hashes are ok.

Clone this wiki locally