Index: trunk/Dockerfile
===================================================================
--- trunk/Dockerfile	(revision 982)
+++ trunk/Dockerfile	(revision 984)
@@ -14,4 +14,10 @@
     libmapserver-dev \
     libmozjs185-dev \
+    \
+    saga \
+    libsaga-api-7.3.0 \
+    libotb \
+    otb-bin \
+    \
     libpq5 \
     libpython3.6 \
@@ -49,6 +55,21 @@
     gettext-base \
     \
+    # Comment lines bellow if nor OTB nor SAGA \
+    libotb-dev \
+    otb-qgis \
+    otb-bin-qt \
+    qttools5-dev \
+    qttools5-dev-tools \
+    qtbase5-dev \
+    libqt5opengl5-dev \
+    libtinyxml-dev \
+    libfftw3-dev \
+    cmake \
+    libsaga-dev \
+    # Comment lines before this one if nor OTB nor SAGA \
+    \
     libfcgi-dev \
     libgdal-dev \
+    libwxgtk3.0-dev \
     libjson-c-dev \
     libssh2-1-dev \
@@ -70,5 +91,5 @@
     && cd ./zoo-project/zoo-kernel \
     && autoconf \
-    && ./configure --with-python=/usr --with-pyvers=3.6 --with-js=/usr --with-mapserver=/usr --with-ms-version=7 --with-json=/usr --with-db-backend --prefix=/usr \
+    && ./configure --with-python=/usr --with-pyvers=3.6 --with-js=/usr --with-mapserver=/usr --with-ms-version=7 --with-json=/usr --with-r=/usr --with-db-backend --prefix=/usr --with-otb=/usr/ --with-itk=/usr --with-otb-version=6.6 --with-itk-version=4.12 --with-saga=/usr --with-saga-version=7.2 --with-wx-config=/usr/bin/wx-config \
     && make \
     && make install \
@@ -82,5 +103,7 @@
     && cp ../zoo-services/hello-py/cgi-env/* /usr/lib/cgi-bin/ \
     && cp ../zoo-services/hello-js/cgi-env/* /usr/lib/cgi-bin/ \
+    && cp ../zoo-services/hello-r/cgi-env/* /usr/lib/cgi-bin/ \
     && cp ../zoo-api/js/* /usr/lib/cgi-bin/ \
+    && cp ../zoo-api/r/minimal.r /usr/lib/cgi-bin/ \
     \
     && cp oas.cfg /usr/lib/cgi-bin/ \
@@ -88,4 +111,36 @@
     # TODO: main.cfg is not processed \
     && prefix=/usr envsubst < main.cfg > /usr/lib/cgi-bin/main.cfg \
+    \
+    #Comment lines below from here if no OTB \
+    && mkdir otb_build \
+    && cd otb_build \
+    && cmake ../../../thirds/otb2zcfg \
+    && make \
+    && mkdir OTB \
+    && cd OTB \
+    && ITK_AUTOLOAD_PATH=/usr/lib/x86_64-linux-gnu/otb/applications/ ../otb2zcfg \
+    && mkdir /usr/lib/cgi-bin/OTB \
+    && cp *zcfg /usr/lib/cgi-bin/OTB \
+    #&& for i in *zcfg; do cp $i /usr/lib/cgi-bin/$i ; j="$(echo $i | sed "s:.zcfg::g")" ; sed "s:$j:OTB_$j:g" -i  /usr/lib/cgi-bin/OTB_$i ; done \
+    #Comment lines before this one if no OTB \
+    \
+    #Comment lines below from here if no SAGA \
+    && cd .. \
+    && make -C ../../../thirds/saga2zcfg \
+    && mkdir zcfgs \
+    && cd zcfgs \
+    && dpkg -L saga \
+    && export MODULE_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/saga/ \
+    && export SAGA_MLB=/usr/lib/x86_64-linux-gnu/saga/ \
+    && ln -s /usr/lib/x86_64-linux-gnu/saga/ /usr/lib/saga \
+    && ../../../../thirds/saga2zcfg/saga2zcfg \
+    && mkdir /usr/lib/cgi-bin/SAGA \
+    && ls \
+    && cp -r * /usr/lib/cgi-bin/SAGA \
+    #Remove OTB if not built or SAGA if no SAGA \
+    && for j in OTB SAGA ; do for i in $(find /usr/lib/cgi-bin/$j/ -name "*zcfg"); do sed "s:image/png:image/png\n     useMapserver = true\n     msClassify = true:g;s:text/xml:text/xml\n     useMapserver = true:g;s:mimeType = application/x-ogc-aaigrid:mimeType = application/x-ogc-aaigrid\n   </Supported>\n   <Supported>\n     mimeType = image/png\n     useMapserver=true:g" -i $i; done; done \
+    \
+    && cd ../.. \
+    #Comment lines before this one if nor OTB nor SAGA \
     \
     && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $BUILD_DEPS \
@@ -158,4 +213,5 @@
 ARG BUILD_DEPS=" \
     git \
+    \
 "
 WORKDIR /zoo-project
@@ -164,5 +220,6 @@
     && apt-get update && apt-get install -y --no-install-recommends $BUILD_DEPS \
     \
-    && git clone https://github.com/ZOO-Project/examples.git 
+    && git clone https://github.com/ZOO-Project/examples.git \
+    && git clone https://github.com/swagger-api/swagger-ui.git
 
 #
@@ -174,4 +231,11 @@
     apache2 \
     curl \
+    cgi-mapserver \
+    mapserver-bin \
+    #Uncomment the line below to add vi editor \
+    #vim \
+    #Uncomment the lines below to add debuging \
+    #valgrind \
+    #gdb \
 "
 
@@ -190,4 +254,5 @@
 COPY --from=demos /zoo-project/examples/data/ /usr/com/zoo-project/
 COPY --from=demos /zoo-project/examples/ /var/www/html/
+COPY --from=demos /zoo-project/swagger-ui /var/www/html/swagger-ui
 
 
@@ -195,9 +260,13 @@
     && apt-get update && apt-get install -y --no-install-recommends $RUN_DEPS \
     \
+    && sed "s=https://petstore.swagger.io/v2/swagger.json=http://localhost/ogc-api/api=g" -i /var/www/html/swagger-ui/dist/index.html \
+    && mv  /var/www/html/swagger-ui/dist  /var/www/html/swagger-ui/oapip \
+    && ln -s /tmp/ /var/www/html/temp \
+    && ln -s /usr/lib/x86_64-linux-gnu/saga/ /usr/lib/saga \
     && rm -rf /var/lib/apt/lists/* \
     && pip3 install Cheetah3 redis\
     && sed "s:AllowOverride None:AllowOverride All:g" -i /etc/apache2/apache2.conf \
     && mkdir -p /tmp/statusInfos \
-    && chown www-data:www-data -R /tmp/statusInfos \
+    && chown www-data:www-data -R /tmp/statusInfos /usr/com/zoo-project \
     && a2enmod cgi rewrite
 
