Skip to content

Consider use of littler install2.r scripts in the "Writing Dockerfiles" docs? #41

Open
@cboettig

Description

@cboettig

install2.r just provides a more concise syntax for adding R packages in Dockerfiles, it's available on all rocker images since we use it in the Rocker Dockerfiles too. One can just do:

RUN install2.r -e  bookdown rticles rmdshower

to install those packages.

Note that the repo is set by default (rstudio CRAN mirror on :latest, versioned images instead pull from the MRAN snapshots by default to ensure reproducibility).

The -e flag is optional, it makes install.packages() throw an error if the package installation fails (which will cause the docker build command to fail). By default, install.packages() only throws a warning, which means that a Dockerfile can build successfully even if it has failed to install the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions