Adding R package for installation from Github to Dockerfile
How do I add installation instruction for R package using github with my Dockerfile.
A common command in R environment:
devtools::install_github("smach/rmiscutils")
But so far there has been no success. Tried adding the github repo in the installation instructions:
RUN install2.r --error \
-r 'http://cran.rstudio.com' \
-r 'http://github.com/smach/rmiscutils'
But I am getting the error:
error in download. Status was '404 Not found'
Maybe a vanilla R call is being used, but cannot define the command. Any hints?
+3
source to share
1 answer
Try the following:
RUN installGithub.r smach/rmiscutils \
&& rm -rf /tmp/downloaded_packages/
It is good practice to remove all downloaded packages to reduce the image size.
Added command here when installing from Bioconductor (in case anyone ends up looking for help here)
RUN install2.r -r http://bioconductor.org/packages/3.0/bioc --deps TRUE \
phyloseq \
&& rm -rf /tmp/downloaded_packages/
+5
source to share