Skip to contents

This function creates a Dockerfile at the root of the project based on a template. The Docker image is based on rocker/rstudio. The whole project will be copied in the image and R packages will be installed (using renv::restore() or remotes::install_deps()).

In addition a .dockerignore file is added to ignore some files/folders while building the image.

User can customize this Dockerfile (e.g. system dependencies). He/she can also use a different default Docker image (i.e. tidyverse, verse, geospatial, etc.). For more information:

By default the versions of R and renv (if applicable) specified in the Dockerfile are the same as the local system.

Once the project is ready to be released, user must build the Docker image by running: docker build -t "image_name" .

Then to run a container, user must run: docker run --rm -p -e DISABLE_AUTH=true image_name

A new instance of RStudio Server is available on the Web browser at the URL:


  given = NULL,
  family = NULL,
  email = NULL,
  open = TRUE,
  overwrite = FALSE,
  quiet = FALSE



A character of length 1. The given name of the project maintainer.


A character of length 1. The family name of the project maintainer.


A character of length 1. The email address of the project maintainer.


A logical value. If TRUE (default) the Dockerfile is opened in the editor.


A logical value. If this file is already present and overwrite = TRUE, it will be erased and replaced. Default is FALSE.


A logical value. If TRUE messages are deleted. Default is FALSE.


No return value.


if (FALSE) {