anchor.diff:  FROM ubuntu:14.04
   
   MAINTAINER Sapoonjyoti DuttaDuwarah
  -
   ### update
   RUN apt-get -q -y update
   RUN apt-get -q -y upgrade
   RUN apt-get -q -y dist-upgrade
   RUN apt-get -q -y install openssh-server
  -RUN apt-get install -q -y curl
  +RUN apt-get -q -y install curl
   
   RUN apt-get -q -y install build-essential \
   			  python \
  
positive.code: RUN pip install flask \
  		gunicorn
  
  RUN mkdir /root/src
  
  WORKDIR /root/src
  
  RUN git clone --recursive https://github.com/camicroscope/oss-lite.git
  
  WORKDIR /root/src/oss-lite
  
  
  
  
  ### need build tools for building openslide and later iipsrv
  RUN apt-get -q -y install git autoconf automake make libtool pkg-config cmake
  
  
  ## get our configuration files
  WORKDIR /root/src
  RUN git clone https://tcpan@bitbucket.org/tcpan/iip-openslide-docker.git
  
  ## setup a mount point for images.  - this is external to the docker container.
  RUN mkdir -p /mnt/images
  
  ### set up the ssh daemon
  RUN mkdir /var/run/sshd
  RUN echo 'root:iipdocker' | chpasswd
  RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
  ## expose some ports
  EXPOSE 22
  
  
  # build with
  #  sudo docker build --rm=true -t="repo/imgname" .
  
  ### need build tools for building openslide and later iipsrv
  RUN apt-get -q -y install git autoconf automake make libtool pkg-config cmake
  
  ## setup a mount point for images.  - this is external to the docker container.
  RUN mkdir -p /mnt/images
  
  
  ### prereqs for openslide
  RUN apt-get -q -y install zlib1g-dev libpng12-dev libjpeg-dev libtiff5-dev libgdk-pixbuf2.0-dev libxml2-dev libsqlite3-dev libcairo2-dev libglib2.0-dev
  
  #Libraries that are needed for openslide 
  RUN curl -O -J -L http://downloads.sourceforge.net/lcms/lcms2-2.7.tar.gz && \
  tar -xzvf lcms2-2.7.tar.gz && \
  
negative.code: make -j4 && make install && \
  cd ../.. && rm -rf openjpeg-2.1.0*
  
  
  ### Openslide
  WORKDIR /root/src
  ## get my fork from openslide source cdoe
  RUN git clone https://bitbucket.org/tcpan/openslide.git
  
  ## build openslide 
  WORKDIR /root/src/openslide
  RUN git checkout tags/v0.3.1
  RUN autoreconf -i 
  #RUN ./configure --enable-static --enable-shared=no
  # may need to set OPENJPEG_CFLAGS='-I/usr/local/include' and OPENJPEG_LIBS='-L/usr/local/lib -lopenjp2'
  # and the corresponding TIFF flags and libs to where bigtiff lib is installed.
  RUN ./configure
  RUN make
  RUN make install
  
  WORKDIR /root/src
  
  RUN git clone --recursive https://github.com/camicroscope/oss-lite.git
  
  ### need build tools for building openslide and later iipsrv
  RUN apt-get -q -y install git autoconf automake make libtool pkg-config cmake
  
  
  WORKDIR /root/src/oss-lite
  
  CMD ["sh", "run.sh"]
  