write_dockerfile: Write a minimal Dockerfile for a Binder

View source: R/write_dockerfile.R

write_dockerfileR Documentation

Write a minimal Dockerfile for a Binder

Description

The file is written to a hidden folder called '.binder/'. This will not interfere with other Dockerfiles that you may have in your root to help with other services like CI.

Usage

write_dockerfile(
  base = NULL,
  path = ".",
  maintainer = getOption("usethis.full_name"),
  r_date = NULL,
  branch = "master",
  install_github = FALSE
)

Arguments

base

Your Docker base. I recommend that you use a binder base from the Rocker project. This daily image will contain all the Jupyter hub elements + Rstudio Server + the Tidyverse (which cuts down on installation time). The only thing then left to do is to install any additional packages listed in your DESCRIPTION file, which will be done during the build_binder step.

path

path to binder repo. Defaults to current location.

maintainer

Maintainer of the Dockerfile. By default the function reads 'usethis.full_name' set in Options. The same information is used to set the author on your DESCRIPTION file. For more information on setting up default values for Description files, read the Rstudio usethis documentation.

r_date

Date you need R to lock down to. By default it picks the most recent date a file was touched in this project but you can override this by specifying this explicitly. Date must be in ISO 8601 format, e.g. 2019-06-27

branch

Default is master but you can pass other branches

install_github

If 'TRUE', it will install all packages listed in Remotes


karthik/holepunch documentation built on Feb. 20, 2023, 5:21 a.m.