Skip to content

Instantly share code, notes, and snippets.

@daroczig
Created May 14, 2015 19:53
Show Gist options
  • Save daroczig/9c6b2f0d1020f84f60a0 to your computer and use it in GitHub Desktop.
Save daroczig/9c6b2f0d1020f84f60a0 to your computer and use it in GitHub Desktop.
R with Java Docker container based on https://github.com/rocker-org/rocker
## Start with the official rocker image (lightweight Debian)
FROM rocker/r-base:latest
MAINTAINER Gergely Daroczi <[email protected]>
## Install Java
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" \
| tee /etc/apt/sources.list.d/webupd8team-java.list \
&& echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" \
| tee -a /etc/apt/sources.list.d/webupd8team-java.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 \
&& echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" \
| /usr/bin/debconf-set-selections \
&& apt-get update \
&& apt-get install -y oracle-java8-installer \
&& update-alternatives --display java \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
&& R CMD javareconf
## Install rJava
RUN install2.r --error rJava
@Hposbic
Copy link

Hposbic commented Apr 21, 2016

Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment