This is a convenience function that generates method for conveniently creating metadata-labels with arguments according to schema version 1.0.0-rc.1

LabelSchemaFactory()

Value

The returned function alows to create labels using the defined label names, e.g. version for org.label-schema.version. For convenience, dashes are replaced by underscores in argument names. Also, the schema-version is set by default as part of the label.

The names that can be used according to are the following:

schema_version, version, build_date, name, description, usage, url, vcs_url, vcs_ref, vendor, docker.cmd, docker.cmd.devel, docker.cmd.test, docker.debug, docker.cmd.help, docker.params, rkt.cmd, rkt.cmd.devel, rkt.cmd.test, rkt.debug, rkt.cmd.help, rkt.params

Details

For details about the Label Schema, see http://label-schema.org/rc1/

See also

Examples

the_dockerfile <- dockerfile(clean_session())
#> INFO [2019-08-20 16:43:46] Creating an R session with the following expressions: #> #> INFO [2019-08-20 16:43:48] Created Dockerfile-Object based on sessionInfo
factory <- LabelSchemaFactory()
#> INFO [2019-08-20 16:43:48] According to Label Schema Convention 1.0.0-rc.1 you can use the following arguments for constructing metadata labels:
label <- factory(name = "ImageName", description = "Description of the image", build_date = Sys.time() ) addInstruction(the_dockerfile) <- label cat(format(the_dockerfile))
#> FROM rocker/r-ver:3.6.1 LABEL maintainer="daniel" WORKDIR /payload/ LABEL org.label-schema.schema-version="1.0.0-rc.1" \ #> org.label-schema.build-date="2019-08-20T16:43:48+0200" \ #> org.label-schema.name="ImageName" \ #> org.label-schema.description="Description of the image" CMD ["R"]