LABEL

The Dockerfile instruction that attaches key-value notes, such as the source repository or version, to an image.

In more detail

Labels are metadata only. The OCI annotation keys, such as org.opencontainers.image.source, let registries and scanners link an image back to its code. A label is a note, not a guarantee: anyone can write any value.

Example

LABEL org.opencontainers.image.source="https://github.com/example/taskapi"

Related terms

Taught in

References

Certification courses