Learn R Programming

containerit (version 0.6.0)

Label: Creates a label of arbitrary content

Description

See https://docs.docker.com/engine/reference/builder/#label

Usage

Label(..., multi_line = FALSE, label_ns = NA_character_)

Arguments

...

One or more named arguments (key-value pairs), that the Instruction should consist of

multi_line

Whether to print labels with multiple values in one single line or to put each key-value pair in a new line.

label_ns

Optionally specify a namespace that should be appended to all keys of the label

Value

the object

See Also

Other label: Label-class, LabelSchemaFactory, Label_Maintainer, Label_SessionInfo

Examples

Run this code
# NOT RUN {
# A simple label that occupies one line:
label1 <- Label(key1 = "this", key2 = "that", otherKey = "content")
# A multiline label with one key/value pair per line
label2 <- Label(
 "info.o2r.name" = "myProject_ImageName",
 "org.label-schema.name" = "ImageName",
 "yet.another_labelname" = "true",
 multi_line = TRUE
)
#label with fixed namespace for all keys
label3 <- Label("name"="A name", "description" = "A description", label_ns = "my.label.ns.")
the_dockerfile <- dockerfile(clean_session())
addInstruction(the_dockerfile) <- list(label1, label2, label3)
cat(format(the_dockerfile),sep = "\n")

# }

Run the code above in your browser using DataLab