Skip to content

Commit

Permalink
Merge pull request #18 from eddelbuettel/sandbox
Browse files Browse the repository at this point in the history
Sandbox -- merge 2014-10-02
  • Loading branch information
eddelbuettel committed Oct 3, 2014
2 parents 408ca33 + 545f91e commit e173fb5
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 44 deletions.
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,31 @@ Work in progress; talk to @eddelbuettel and @cboettig about how to get involved.

### Debian-based Docker Containers ###

| Docker Container Source on GitHub | Docker Hub Build Status and Docker Hub URL
| :--------------------------------------- | :-----------------------------------------
| r-base (base package to build from) | [good](https://registry.hub.docker.com/u/eddelbuettel/debian-r-base/)
| r-devel (base plus R-devel from SVN) | [good](https://registry.hub.docker.com/u/eddelbuettel/debian-r-devel/)
| rstudio (base plus RStudio Server) | [good](https://registry.hub.docker.com/u/eddelbuettel/debian-rstudio/)
| hadleyverse (base plus Hadley packages) | [good](https://registry.hub.docker.com/u/eddelbuettel/debian-hadleyverse/)
| Docker Container Source on GitHub | Docker Hub Build Status and Docker Hub URL
| :--------------------------------------- | :-----------------------------------------
| r-base (base package to build from) | [good](https://registry.hub.docker.com/u/eddelbuettel/debian-r-base/)
| r-devel (base plus R-devel from SVN) | [good](https://registry.hub.docker.com/u/eddelbuettel/debian-r-devel/)
| rstudio (base plus RStudio Server) | [good](https://registry.hub.docker.com/u/eddelbuettel/debian-rstudio/)
| hadleyverse (rstudio plus Hadley packages) | [good](https://registry.hub.docker.com/u/eddelbuettel/debian-hadleyverse/)

### Ubuntu-based Docker Containers ###

| Docker Container Source on GitHub | Docker Hub Build Status and Docker Hub URL
| :--------------------------------------- | :-----------------------------------------
| r-base (base package to build from) | pending
| r-devel (base plus R-devel) | pending
| rstudio (base plus RStudio Server) | pending
| hadleyverse (base plus Hadley packages) | pending
| Docker Container Source on GitHub | Docker Hub Build Status and Docker Hub URL
| :--------------------------------------- | :-----------------------------------------
| r-base (base package to build from) | [good](https://registry.hub.docker.com/u/eddelbuettel/ubuntu-r-base/)
| r-devel (base plus R-devel from SVN) | [good](https://registry.hub.docker.com/u/eddelbuettel/ubuntu-r-devel/)
| rstudio (base plus RStudio Server) | pending
| hadleyverse (rstudio plus Hadley packages) | pending

## Trademarks ##

RStudio is registered trademarks of RStudio, Inc. The use
of the trademarked term RStudio and the distribution
of the RStudio binaries through the images hosted on
[hub.docker.com](https://registry.hub.docker.com/) has been granted
by explicit permission of RStudio. Please review [RStudio's
trademark use policy](http://www.rstudio.com/about/trademark/) and
address inqueries about further distribution or other questions to
[permissions@rstudio.com](emailto:permissions@rstudio.com).


39 changes: 28 additions & 11 deletions debian/hadleyverse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,42 @@ RUN echo 'deb http://debian-r.debian.net/debian-r/ unstable main' >> /etc/apt/so
RUN echo 'deb-src http://debian-r.debian.net/debian-r/ unstable main' >> /etc/apt/sources.list \
&& echo 'deb-src http://http.debian.net/debian testing main' >> /etc/apt/sources.list

## Refresh package list and upgrade
RUN apt-get -qq update && apt-get -qqy dist-upgrade

## rmarkdown needs pandoc, and works best with some additional (large!) latex libraries
RUN apt-get install -qqy --no-install-recommends texlive-humanities \
lmodern texlive-fonts-recommended texlive-latex-extra imagemagick \
pandoc pandoc-citeproc
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
imagemagick \
lmodern \
pandoc \
pandoc-citeproc \
texlive-fonts-recommended \
texlive-humanities \
texlive-latex-extra

## Install build dependencies for R packages with apt-get build-dep
RUN apt-get install -qqy --no-install-recommends build-essential \
&& apt-get build-dep -y r-cran-rgl r-cran-xml r-cran-rjava \
r-cran-rmysql r-cran-rsqlite r-cran-rsqlite.extfuns r-cran-rpostgresql
RUN apt-get update && apt-get build-dep -y \
r-cran-rgl \
r-cran-rjava \
r-cran-rmysql \
r-cran-rpostgresql
r-cran-rsqlite \
r-cran-rsqlite.extfuns \
r-cran-xml

## Finally ready to install the R packages. NOTE: failure to install a package doesn't throw an image build error.
## Install devtools, ggplot2, dplyr, tidyr + full suggests lists
RUN install2.r devtools ggplot2 dplyr tidyr reshape2 roxygen2 knitr testthat rmarkdown httr
RUN install2.r \
devtools \
dplyr \
ggplot2 \
httr \
knitr \
reshape2 \
rmarkdown \
roxygen2 \
testthat \
tidyr

## Set default mirror for github installs
RUN echo 'options("repos"="http://cran.rstudio.com", encoding="UTF-8")' > /.Rprofile
## Add a few github repos where the CRAN version isn't sufficiently recent (e.g. has outstanding bugs)
RUN Rscript -e 'devtools::install_github(c("hadley/reshape"));'

Expand Down
3 changes: 3 additions & 0 deletions debian/r-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ RUN apt-get install -y --no-install-recommends r-base r-base-dev r-recommended l

## Install a few more things that are useful
RUN apt-get install -y --no-install-recommends vim-tiny less wget

## Set a default CRAN Repo
RUN echo 'options("repos"="http://cran.rstudio.com", encoding="UTF-8")' > /etc/R/Rprofile.site
33 changes: 22 additions & 11 deletions debian/rstudio/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
## Start with the rocker image providing 'base R' using a small Debian testing installation and the current R release
FROM eddelbuettel/debian-r-base

MAINTAINER Carl Boettiger cboettig@ropensci.org
ENV DEBIAN-FRONTEND noninteractive
## This handle reaches Carl and Dirk
MAINTAINER "Carl Boettiger and Dirk Eddelbuettel" rocker-maintainers@eddelbuettel.com

## Stay up-to-date (modulo caching)
RUN apt-get update -q && apt-get dist-upgrade -yq
## discourage apt from prompting the user for input
ENV DEBIAN-FRONTEND noninteractive
ENV PATH /usr/lib/rstudio-server/bin/:$PATH

## Download and install RStudio server
RUN apt-get install -yq supervisor sudo libcurl4-openssl-dev \
git locales psmisc && dpkg-reconfigure locales \
RUN apt-get update && apt-get install -y \
git \
locales \
libcurl4-openssl-dev \
psmisc \
supervisor \
sudo \
&& dpkg-reconfigure locales \
&& wget -q http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl0.9.8_0.9.8o-4squeeze14_amd64.deb \
&& dpkg -i libssl0.9.8_0.9.8o-4squeeze14_amd64.deb && rm libssl0.9.8_0.9.8o-4squeeze14_amd64.deb \
&& wget -q http://download2.rstudio.org/rstudio-server-0.98.1062-amd64.deb \
&& dpkg -i rstudio-server-0.98.1062-amd64.deb && rm rstudio-server-*-amd64.deb
&& (wget -q https://s3.amazonaws.com/rstudio-server/current.ver -O currentVersion.txt \
&& ver=$(cat currentVersion.txt) \
&& wget -q http://download2.rstudio.org/rstudio-server-${ver}-amd64.deb \
&& dpkg -i rstudio-server-${ver}-amd64.deb \
&& rm rstudio-server-*-amd64.deb currentVersion.txt )

## This shell script is executed by supervisord when it is run by CMD, configures env variables
ADD userconf.sh /usr/bin/userconf.sh
COPY userconf.sh /usr/bin/userconf.sh

## Configure persistent daemon serving RStudio-server on (container) port 8787
RUN mkdir -p /var/log/supervisor
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

EXPOSE 8787

## To have a container run multiple & persistent tasks, we use the very simple supervisord as recommended in Docker documentation.
## To have a container run a persistent task, we use the very simple supervisord as recommended in Docker documentation.
CMD ["/usr/bin/supervisord"]


1 change: 0 additions & 1 deletion debian/rstudio/userconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ git config --global user.name $USER
git config --global user.email $EMAIL
git config --global credential.helper cache
cp /.gitconfig /home/$USER
echo 'options("repos"="http://cran.rstudio.com", encoding="UTF-8")' > /home/$USER/.Rprofile

## Global config make page-up/down search history
echo '"\e[5~": history-search-backward' >> /etc/inputrc && echo '"\e[6~": history-search-backward' >> /etc/inputrc
Expand Down
2 changes: 0 additions & 2 deletions ubuntu/hadleyverse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ r-cran-rmysql r-cran-rsqlite
## Install Hadleyverse packages
RUN install2.r devtools ggplot2 dplyr tidyr reshape2 roxygen2 knitr testthat rmarkdown httr rcpp rpostgresql

## Use GitHub version for these
RUN echo 'options("repos"="http://cran.rstudio.com", encoding="UTF-8")' > /.Rprofile
RUN Rscript -e 'devtools::install_github(c("hadley/reshape"));'


Expand Down
4 changes: 2 additions & 2 deletions ubuntu/r-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ RUN apt-get install -y --no-install-recommends r-base r-base-dev r-recommended l
## Install a few more things that are useful
RUN apt-get install -y --no-install-recommends vim-tiny less wget



## Set a default CRAN Repo
RUN echo 'options("repos"="http://cran.rstudio.com", encoding="UTF-8")' > /etc/R/Rprofile.site
13 changes: 9 additions & 4 deletions ubuntu/rstudio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ MAINTAINER Carl Boettiger cboettig@ropensci.org
## discourage apt from prompting the user for input
ENV DEBIAN-FRONTEND noninteractive

## Stay up-to-date (modulo caching)
RUN apt-get update -q && apt-get dist-upgrade -yq

## Download and install RStudio server
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe" >> /etc/apt/sources.list \
&& apt-get update -q && apt-get dist-upgrade -yq \
&& apt-get install -y -q gdebi-core libapparmor1 supervisor sudo libcurl4-openssl-dev wget git \
&& apt-get update -q \
&& apt-get install -y -q libapparmor1 supervisor sudo libcurl4-openssl-dev git \
&& update-locale \
&& wget http://download2.rstudio.org/rstudio-server-0.98.994-amd64.deb \
&& gdebi -n rstudio-server-0.98.994-amd64.deb && rm rstudio-server-*-amd64.deb
&& (wget -q https://s3.amazonaws.com/rstudio-server/current.ver -O currentVersion.txt \
&& ver=$(cat currentVersion.txt) \
&& wget http://download2.rstudio.org/rstudio-server-${ver}-amd64.deb \
&& dpkg -i rstudio-server-${ver}-amd64.deb && rm rstudio-server-*-amd64.deb)

## This shell script is executed by supervisord when it is run by CMD, configures env variables
ADD userconf.sh /usr/bin/userconf.sh
Expand Down
1 change: 0 additions & 1 deletion ubuntu/rstudio/userconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ git config --global user.name $USER
git config --global user.email $EMAIL
git config --global credential.helper cache
cp /.gitconfig /home/$USER
echo 'options("repos"="http://cran.rstudio.com", encoding="UTF-8")' > /home/$USER/.Rprofile

## Global config make page-up/down search history
echo '"\e[5~": history-search-backward' >> /etc/inputrc && echo '"\e[6~": history-search-backward' >> /etc/inputrc
Expand Down

0 comments on commit e173fb5

Please sign in to comment.