Docker: come installare RCurl al contenitore Docker?

Sto provando ad installare un contenitore di RCurl per Docker, remix di questo Dockerfile, ma fallimento. Così

Come posso installare RCurl al contenitore Docker?

Dockerfile

$ cat Dockerfile FROM r-base RUN apt-get -y install r-base RUN pip install rpy2 RUN apt-get -y install libcurl4-openssl-dev #setup R configs RUN echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; options(repos = r);" > ~/.Rprofile RUN Rscript -e "install.packages('yhatr')" RUN Rscript -e "install.packages('ggplot2')" RUN Rscript -e "install.packages('plyr')" RUN Rscript -e "install.packages('reshape2')" RUN Rscript -e "install.packages('forecast')" RUN Rscript -e "install.packages('stringr')" RUN Rscript -e "install.packages('lubridate')" RUN Rscript -e "install.packages('randomForest')" RUN Rscript -e "install.packages('rpart')" RUN Rscript -e "install.packages('e1071')" RUN Rscript -e "install.packages('kknn')" RUN Rscript -e "install.packages('RCurl')" RUN Rscript -e "install.packages('rjson')" 

Errore di installazione di Docker

 trying URL 'https://cran.rstudio.com/src/contrib/RCurl_1.95-4.8.tar.gz' Content type 'application/x-gzip' length 916934 bytes (895 KB) ================================================== downloaded 895 KB * installing *source* package 'bitops' ... ** package 'bitops' successfully unpacked and MD5 sums checked ** libs gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c bit-ops.c -o bit-ops.o gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c cksum.c -o cksum.o gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o bitops.so bit-ops.o cksum.o -L/usr/lib/R/lib -lR installing to /usr/local/lib/R/site-library/bitops/libs ** R ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (bitops) * installing *source* package 'RCurl' ... ** package 'RCurl' successfully unpacked and MD5 sums checked checking for curl-config... no Cannot find curl-config ERROR: configuration failed for package 'RCurl' * removing '/usr/local/lib/R/site-library/RCurl' The downloaded source packages are in '/tmp/RtmpJrfUvL/downloaded_packages' Warning message: In install.packages("RCurl") : installation of package 'RCurl' had non-zero exit status ---> b8de6bc67379 Removing intermediate container e8c17d0306ef 

Dirk suggerì di installare da binari che si riferivano a build hadleyvers in rocker qui :

Docker che fornisce l'ecosistema di package RStudio + rmarkdown / pandoc / latex + R da Hadley Wickham

quindi stiamo ricevendo un sacco di extra oltre al Basic RCurl .

Di seguito è ansible creare il contenitore dall'image docker e avviarlo con una directory dal proprio host, lasciandoti in shell interattivo, bash. Là è ansible aprire la session R con $ R nella row di command in cui funziona il command install.packages('RCurl') .

 $ docker build -t 20170127_r . $ docker run -v ~/Desktop/20161213_project/:/project -it 20170127_r bash` 

Dockerfile

  #R with RCurl #https://github.com/rocker-org/hadleyverse/blob/master/Dockerfile # FROM rocker/verse MAINTAINER "Carl Boettiger and Dirk Eddelbuettel" [email protected] ## Install some external dependencies. RUN apt-get update \ && apt-get install -y --no-install-recommends \ default-jdk \ default-jre \ icedtea-netx \ libbz2-dev \ libcairo2-dev \ libgdal-dev \ libicu-dev \ liblzma-dev \ libproj-dev \ libgeos-dev \ libgsl0-dev \ librdf0-dev \ librsvg2-dev \ libv8-dev \ libxcb1-dev \ libxdmcp-dev \ libxslt1-dev \ libxt-dev \ mdbtools \ netcdf-bin \ && . /etc/environment \ && install2.r -e -r $MRAN rJava \ && R CMD javareconf \ && apt-get clean \ && rm -rf /var/lib/apt/lists/ \ && rm -rf /tmp/downloaded_packages/ /tmp/*.rds ## tidyverse, devtools and related R packages already inherited from rocker/verse ## httr authentication uses this port EXPOSE 1410 ENV HTTR_LOCALHOST 0.0.0.0 

where non è chiaro quali pacchetti sono sufficienti per l'installazione RCurl .