R DevOps
rocker
Dec 16, 2018     2 minutes read

1. What is rocker and why would you use it?

2. Rocker versions

An official site of rocker proposes a few versions of r images. The most interesting ones:

3. Example of Dockerfile

A nice tutorial on writing a Dockerfile you will here. As rocker’s Dockerfile has it’s specific quirks, I present it in a separate blog post.

FROM rocker/r-ver:3.5.1

RUN Rscript -e "install.packages('futile.logger')"

RUN R -e "install.packages('devtools')"

RUN install2.r -e bookdown rticles

CMD R

We used 3 different methods to install packages. All of them all synonyms, so you can use whichever you like. Probably install2.r has the cleanest syntax.

The you can build your image with:

docker build -t my_rocker:0.1 .

And you’re good to go!

hah, that’s funny. The guy who wrote the tutorial above started the first lesson with the words:

What is Docker and Why should I use it?

so in the same manner as I start every blog post.

5. Subjects still to cover