1 DL3050
Moritz Röhrich edited this page 2021-03-23 12:23:41 +01:00

Superfluous label(s) present.

This rule is only activated when linting with the strict-labels option. This can be specified via config file

strict-labels: true

or via command line:

$ hadolint --strict-labels Dockerfile

Note, that when no label-schema is specified, all labels are considered superfluous by this rule.

Problematic code:

FROM busybox
LABEL superfluous="this should not be here"

Correct code:

FROM busybox

Rationale:

In certain situations, it may be desirable to ensure no labels other than those specified in the label-schema are present. This may be required to avoid information leakage, to not confuse label parsers or to ensure compliance to standards.