anchor.diff:    libdigest-sha-perl \
     libssl-dev \
     libapparmor1 \
  +  libpq-dev \
     wget
   
   # log R version
   RUN R --version
   
   #install R packages
  -RUN sudo su - -c "R -e \"install.packages('Rserve', repos='http://cran.r-project.org')\""
  -RUN sudo su - -c "R -e \"install.packages('ggplot2', repos='http://cran.r-project.org')\""
  -RUN sudo su - -c "R -e \"install.packages('RJSONIO', repos='http://cran.r-project.org')\""
  -RUN sudo su - -c "R -e \"install.packages('rjson', repos='http://cran.r-project.org')\""
  -RUN sudo su - -c "R -e \"install.packages('Rmisc', repos='http://cran.r-project.org')\""
  -RUN sudo su - -c "R -e \"install.packages('signal', repos='http://cran.r-project.org')\""
  -RUN sudo su - -c "R -e \"install.packages('foreach', repos='http://cran.r-project.org')\""
  -RUN sudo su - -c "R -e \"install.packages('doParallel', repos='http://cran.r-project.org')\""
  -
  -# Create app directory
  -RUN mkdir -p /usr/src/app
  -WORKDIR /usr/src/app
  -
  -# Bundle app source
  -COPY . /usr/src/app
  +RUN R -e "install.packages(c('Rserve','Rmisc','Rmisc','signal','foreach','doParallel','RJSONIO','stringr', 'zoo', 'parallel','pracma','rjson','gdata','nnet','RPostgreSQL','reshape'), repos='http://cran.r-project.org')"
   
   # Add rserve user
   RUN groupadd -r rserve && useradd -r -g rserve rserve
  
positive.code: ADD start.R start.R
  ADD Rserv.conf /Rserv.conf
  EXPOSE 6311
  CMD Rscript start.R
  
negative.code: MAINTAINER wasserball
  
  # Install latest R
  RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list
  # add the public keys:
  RUN gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
  RUN gpg -a --export E084DAB9 | apt-key add -
    
  # Update and install
  RUN apt-get update && apt-get install -y \
  