Skip to contents

These functions look in a Dockerfile (locally or online) to extract environment variables corresponding to DeGAUSS image metadata.

Usage

get_degauss_env_dockerfile(
  dockerfile_path = fs::path_join(c(getwd(), "Dockerfile"))
)

get_degauss_env_online(name = "fortunes")

Arguments

dockerfile_path

path to Dockerfile

name

name of DeGAUSS container to download Dockerfile from

Value

named vector of DeGAUSS metatdata

Details

Metadata on DeGAUSS images are defined using environment variables. Specifically within a Dockerfile, this is defined as ENV instructions where the name of the environment variable begins with degauss_, for example "degauss_name", or "degauss_version". It is assumed that each ENV instruction is on its own line and defines only one environment variable.

Examples

if (FALSE) {
use_degauss_dockerfile(version = "0.1")
get_degauss_env_dockerfile()
get_degauss_env_dockerfile()["degauss_version"]
}
get_degauss_env_online("fortunes")
#>                             degauss_name 
#>                               "fortunes" 
#>                          degauss_version 
#>                                  "0.1.3" 
#>                      degauss_description 
#>                          "random quotes" 
#>                         degauss_argument 
#> "number of quotes to print [default: 1]" 
get_degauss_env_online("fortunes")["degauss_version"]
#> degauss_version 
#>         "0.1.3"