Getting started with dockerfiler

Colin Fay



Easy Dockerfile Creation from R.


You can install dockerfiler from GitHub with:

Or from CRAN with :

Basic worflow

By default, Dockerfiles are created with FROM "rocker/r-base".

You can set another FROM in new()

Wrap your raw R Code inside the r() function to turn it into a bash command with R -e.

Classical Docker stuffs:

See your Dockerfile :

If you’ve made a mistake in your script, you can switch lines with the switch_cmd method. This function takes as arguments the positions of the two cmd you want to switch :

You can also remove a cmd with remove_cmd:

This also works with a vector:

add_after add a command after a given line.

Save your Dockerfile:

Create a Dockerfile from a DESCRIPTION

You can use a DESCRIPTION file to create a Dockerfile that installs the dependencies and the package.