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

Label_SessionInfo(session = sessionInfo(), as_json = FALSE)

Arguments

session

An object of class 'sessionInfo' as returned by utils::sessionInfo(), or alternatively a class 'session_info' as returned by devtools::session_info()

as_json

Determines whether to parse the session information to a json-string instead of a plain string

Value

A label with key 'R.session-info' and the deparsed session information in one line

See also

Examples

the_session <- clean_session()
#> INFO [2019-08-20 16:43:48] Creating an R session with the following expressions: #>
the_dockerfile <- dockerfile(the_session)
#> INFO [2019-08-20 16:43:49] Created Dockerfile-Object based on sessionInfo
addInstruction(the_dockerfile) <- Label_SessionInfo(the_session)