Sign inSign up

kimmanlui/rstudio

By kimmanlui

•Updated over 9 years ago

Based on njordr/rstudio image, many R packages such quantmod, TTR, caret etc are included.

Image
1

10K+

kimmanlui/rstudio repository overview

⁠Introduction (11 Feb 2017)

This image (rstudio server) was built on njordr/studio as there is no need to do it from scratch. Many R packages have been installed (e.g. quantmod, TTR, caret, h20, RJDBC, rJava, GA etc)

⁠Maintainer

kimman, A1234567890123456789012345 (-A-T-) outlook.com

⁠Execution

There are two ways to run the image: [Method1] docker run -d -p 8787:8787 --name rstudio kimmanlui/rstudio [Method2] docker run -it --entrypoint /bin/bash -p 8787:8787 --name rstudio kimmanlui/rstudio Then a prompt appears. Type: rserver To ensure it is running, type: ps aux

⁠Login

http://localhost:8787/⁠ then login:kimman and password:kimman

⁠Dockerfile

FROM njordr/rstudio MAINTAINER kimman RUN apt-get -y update RUN apt-get -y install libbz2-dev libpcre3-dev RUN apt-get -y install gcc-multilib RUN apt-get -y install software-properties-common

RUN apt-get -y install openjdk-7-jdk ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64/jre ENV PATH $PATH:$JAVA_HOME/bin RUN R CMD javareconf RUN apt-get -y install r-cran-rjava

⁠

RUN echo "server-app-armor-enabled=0" >> /etc/rstudio/rserver.conf

⁠

RUN Rscript -e "install.packages('zoo')" RUN Rscript -e "install.packages('xts')" RUN Rscript -e "install.packages('quantmod')" RUN Rscript -e "install.packages('TTR')" RUN Rscript -e "install.packages('proxy')" RUN Rscript -e "install.packages('bitops')" RUN Rscript -e "install.packages('rjson')" RUN Rscript -e "install.packages('plyr')" RUN Rscript -e "install.packages('reshape')" RUN apt-get -y install libcurl4-openssl-dev RUN Rscript -e "install.packages('RCurl')" RUN Rscript -e "install.packages('httr')" RUN Rscript -e "install.packages('RJDBC')" RUN Rscript -e "install.packages('data.table')" RUN Rscript -e "install.packages('lubridate')" RUN Rscript -e "install.packages('ggplot2')" RUN Rscript -e "install.packages('gridExtra')" RUN Rscript -e "install.packages('plotrix')" RUN Rscript -e "install.packages('kohonen')" RUN apt-get -y install r-cran-xml RUN Rscript -e "install.packages('h2o', repos=(c('http://s3.amazonaws.com/h2o-release/h2o/master/1497/R⁠', type='source', getOption('repos'))))" RUN Rscript -e "install.packages('GA')" RUN apt-get -y install r-cran-car RUN Rscript -e "install.packages('caret', dependencies=TRUE)" RUN Rscript -e "install.packages('radarchart')" RUN Rscript -e "install.packages('mclust', dependencies=TRUE)" RUN Rscript -e "install.packages('forecast', dependencies=TRUE)" RUN Rscript -e "install.packages('WaveletComp', dependencies=TRUE)" RUN Rscript -e "install.packages('Rook', dependencies=TRUE)" RUN Rscript -e "install.packages('gtable', dependencies=TRUE)" RUN Rscript -e "install.packages('ff', dependencies=TRUE)" RUN Rscript -e "install.packages('shiny', dependencies=TRUE)" RUN Rscript -e "install.packages('dplyr', dependencies=TRUE)" RUN Rscript -e "install.packages('xtable', dependencies=TRUE)" RUN apt-get -y install libxml2-dev RUN Rscript -e "install.packages('rvest')"

⁠

RUN apt-get -y install openssh-server

⁠

RUN useradd -m -c "kimman" kimman -s /bin/bash RUN echo 'kimman:kimman' | chpasswd RUN useradd -m -c "b1" b1 -s /bin/bash RUN echo 'b1:kimman' | chpasswd RUN useradd -m -c "b2" b2 -s /bin/bash RUN echo 'b2:kimman' | chpasswd RUN useradd -m -c "b3" b3 -s /bin/bash RUN echo 'b3:kimman' | chpasswd RUN useradd -m -c "b4" b4 -s /bin/bash RUN echo 'b4:kimman' | chpasswd RUN useradd -m -c "b5" b5 -s /bin/bash RUN echo 'b5:kimman' | chpasswd RUN useradd -m -c "b6" b6 -s /bin/bash RUN echo 'b6:kimman' | chpasswd RUN addgroup vboxsf RUN groupmod -g 998 vboxsf RUN usermod -a -G rstudio-server,root,vboxsf kimman RUN usermod -a -G rstudio-server,root,vboxsf b1 RUN usermod -a -G rstudio-server,root,vboxsf b2 RUN usermod -a -G rstudio-server,root,vboxsf b3 RUN usermod -a -G rstudio-server,root,vboxsf b4 RUN usermod -a -G rstudio-server,root,vboxsf b5 RUN usermod -a -G rstudio-server,root,vboxsf b6 RUN sudo adduser kimman sudo RUN sudo adduser b1 sudo RUN sudo adduser b2 sudo RUN sudo adduser b3 sudo RUN sudo adduser b4 sudo RUN sudo adduser b5 sudo RUN sudo adduser b6 sudo RUN mkdir /Users RUN mkdir /Users/admin RUN mkdir /Users/admin/cache RUN mkdir /Users/admin/temp RUN mkdir /Users/admin/temp/report RUN mkdir /Users/admin/temp/tmp0 RUN mkdir /Users/admin/temp/tmp1 RUN mkdir /Users/admin/temp/tmp2 RUN mkdir /Users/admin/temp/tmp3 RUN mkdir /Users/admin/temp/tmp4 RUN mkdir /Users/admin/temp/tmp5 RUN mkdir /Users/admin/temp/tmp6 RUN mkdir /Users/admin/temp/tmp7 RUN mkdir /Users/admin/temp/tmp8 RUN mkdir /Users/admin/temp/tmp9 RUN mkdir /Users/admin/temp/tmpdc RUN chmod -R 777 /Users/admin/cache RUN chmod -R 777 /Users/admin/temp RUN echo "auth-required-user-group=rstudio-server" >> /etc/rstudio/rserver.conf RUN ln -fs /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime && dpkg-reconfigure -f noninteractive tzdata #RUN sudo -H -u kimman bash -c 'ssh-keygen -q -t rsa -f "$HOME/.ssh/id_rsa" -P ""' #CMD ["/usr/lib/rstudio-server/bin/rserver"] #then #docker run -it -p 8787:8787 kimman/rstudio bash #once it returns a prompt, type "rserver" #remeber to change the password RUN echo "type: rserver" RUN echo "type: /etc/init.d/ssh restart"

⁠

#ENTRYPOINT ["/usr/lib/rstudio-server/bin/rserver"] ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] EXPOSE 8787

Tag summary

Content type

Image

Digest

Size

725 MB

Last updated

over 9 years ago

docker pull kimmanlui/rstudio