This rule raise an issue when one of the mandatory label are missing.

Why is this an issue?

Adding labels to your image help to organize images by project, record licensing information, aid in automation and for other reasons.
The rule provide the possibility to configure the list of mandatory label that must be present in every Dockerfile.

How to fix it

Code examples

Noncompliant code example

With labels set to maintainer,description,version

FROM ubuntu:22.02
RUN my_command

Compliant solution

FROM ubuntu:22.02
LABEL maintainer="John Doe"
LABEL description="Image doing XYZ"
LABEL version=1.0
RUN my_command

Resources

Documentation