dock_from_desc: Docker file from DESCRIPTION

Description Usage Arguments Value Note Examples

Description

This function will parse a DESCRIPTION file and create a Dockerfile that remotes::install_cran all the functions from the Imports section, add the COPY of the tar.gz of the package, and install the package.

Usage

1
2
dock_from_desc(path = "DESCRIPTION", FROM = "rocker/r-base",
  AS = NULL)

Arguments

path

Path to DESCRIPTION

FROM

FROM of the Dockerfile

AS

AS of the Dockerfile

Value

A Dockerfile Object.

Note

After this Dockerfile is created, the package should be built and be put in the same directory as the dockerfile.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
my_dock <- dock_from_desc("DESCRIPTION")
my_dock
my_dock$CMD(r(library(dockerfiler)))
my_dock$add_after(
cmd = "RUN R -e 'remotes::install_cran(\"rlang\")'",
after = 3
)

## End(Not run)

dockerfiler documentation built on May 2, 2019, 2:45 a.m.