dashR icon indicating copy to clipboard operation
dashR copied to clipboard

What is the advantage of using `init.R` versus installing packages directly in `Dockerfile` with `RUN Rscript -e install.packages...`?

Open joelostblom opened this issue 4 years ago • 2 comments

I would naively have done the latter, but the dash deployment docs are using init.R. Is this mostly to prevent the entire docker build from crashing if something is wrong with a user installed package or are there other advantages to this approach?

joelostblom avatar Jan 26 '21 18:01 joelostblom

Related, since the dash docks now uses install.packages('dash'), should the deployment docs be updated to use this instead of remotes::install_github('plotly/dashR', upgrade=TRUE)?

joelostblom avatar Jan 26 '21 18:01 joelostblom

One advantage I ran into is that when trying to install devtools via the docker image, the build would fail due to an error with the dependency packages gert and usethis. I had to modify apt-packages to include libgit2-dev and libcurl4-gnutls-dev instead of libcurl4-openssl-dev for these packages to install correctly and I am not sure if that has any side effects. When installing devtools via init.R everything works fine with the default apt-packages.

joelostblom avatar Jan 26 '21 19:01 joelostblom