gesistsa/rang

The Dockerfile generation part is kind of ugly

Closed this issue · 0 comments

https://github.com/chainsawriot/rang/blob/de0f640bbfc253deb6947c30ebc56da863d0b368/R/installation.R#L117-L168

The index-based injection is kind of ugly (and risky). But the containerit way of OOP it is kind of overkill.

In general, there are five parts in a Dockerfile.

  1. FROM stuff (+ ADD)
  2. Unchanged Chores of setting up timezone (e.g. ENV TZ UTC)
  3. COPY statements where rang.R always gets copied, cache and compile_r.sh optional
  4. RUN statements (either 1) just run rang, 2) just run compile_r, or mkdir lib and then 1 or 2)
  5. CMD (All CMD ["R"] except rstudio)