Add OCI image labels

Apache 2.0

Adds standard OCI (Open Container Initiative) image labels to a Dockerfile. These labels provide metadata about the image such as title, version, source, and license information. See https://github.com/opencontainers/image-spec/blob/main/annotations.md for the specification.

org.openrewrite.docker.AddOciLabels

Optional

Human-readable title of the image (org.opencontainers.image.title).

Human-readable description of the image (org.opencontainers.image.description).

Version of the packaged software (org.opencontainers.image.version).

Date and time the image was built in RFC 3339 format. If 'now', uses the current time.

Source control revision identifier for the packaged software (org.opencontainers.image.revision).

URL to get source code for building the image (org.opencontainers.image.source).

URL to find more information about the image (org.opencontainers.image.url).

Name of the distributing entity, organization, or individual (org.opencontainers.image.vendor).

License(s) under which contained software is distributed as a SPDX License Expression (org.opencontainers.image.licenses).

Contact details of the people or organization responsible (org.opencontainers.image.authors).

mod run . --recipe=org.openrewrite.docker.AddOciLabels

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.