See https://docs.docker.com/engine/reference/builder/#label
Label(..., multi_line = FALSE, label_ns = NA_character_)
... | 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 |
the object
Other label: Label-class
,
LabelSchemaFactory
,
Label_Maintainer
,
Label_SessionInfo
# 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())#> INFO [2019-08-20 16:43:44] Creating an R session with the following expressions: #> #> INFO [2019-08-20 16:43:46] Created Dockerfile-Object based on sessionInfoaddInstruction(the_dockerfile) <- list(label1, label2, label3) cat(format(the_dockerfile),sep = "\n")#> FROM rocker/r-ver:3.6.1 #> LABEL maintainer="daniel" #> WORKDIR /payload/ #> LABEL key1="this" key2="that" otherKey="content" #> LABEL info.o2r.name="myProject_ImageName" \ #> org.label-schema.name="ImageName" \ #> yet.another_labelname="true" #> LABEL my.label.ns.name="A name" my.label.ns.description="A description" #> CMD ["R"]