Add Docker LABEL instruction

Apache 2.0

Adds or updates a LABEL instruction in a Dockerfile. By default, adds to the final stage only.

org.openrewrite.docker.AddOrUpdateLabel

Required

The key of the label to add.

The value of the label.

Optional

overwriteExistingBoolean

If true, overwrite the label if it already exists. If false, skip if exists. Defaults to true.

Only add the label to this build stage. If null, adds to the final stage only.

mod run . --recipe=org.openrewrite.docker.AddOrUpdateLabel \ -P key=org.opencontainers.image.version \ -P value=1.0.0

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