Label: Creates a label of arbitrary content

Description Usage Arguments Value See Also Examples

View source: R/Class-Label.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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")

o2r-project/containerit documentation built on June 28, 2021, 2:46 p.m.