Skip to content
Moritz Röhrich edited this page Mar 23, 2021 · 1 revision

Label <label> does not conform to semantic versioning.

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

$ hadolint --require-label version:semver Dockerfile

or in the config file:

label-schema:
  version: semver

Problematic code:

LABEL version="something-other-than-a-version-number"

Correct code:

LABEL version="1.0.0-rc1"

Rationale:

Specifying a version either for the resulting image or for the software contained within is often a crucial part of release engineering. Semantic versioning allows to do so in a well understood manner, which also communicates extend of changes between versions or possible incompatibilities.

Note:

This rule does not expand variables. It requires the value of a label to be a literal semantic version number.

Clone this wiki locally