Commit 586a50d5 authored by Cresson Remi's avatar Cresson Remi

ENH: lighter docker image, add user in docker image

parent 2707a129
......@@ -217,7 +217,7 @@ RUN mkdir -p /work/otb/build \
# Build OTB: Stage 3 (bindings)
# ----------------------------------------------------------------------------
RUN cd /work/otb/otb/Modules/Remote \
&& git clone https://github.com/remicres/otbtf.git \
&& git clone -b v2beta https://github.com/remicres/otbtf.git \
&& cd /work/otb/build/OTB/build \
&& cmake /work/otb/otb \
-DOTB_WRAP_PYTHON=ON \
......@@ -235,10 +235,22 @@ RUN cd /work/otb/otb/Modules/Remote \
# Add important environment variables
# ----------------------------------------------------------------------------
ENV PATH="$PATH:/work/otb/superbuild_install/bin/"
ENV PYTHONPATH="/work/otb/superbuild_install/lib/otb/python:/work/otb/otb/Modules/Remote/otbtf/python$PYTHONPATH"
ENV PYTHONPATH="/work/otb/superbuild_install/lib/otb/python:/work/otb/otb/Modules/Remote/otbtf/python:$PYTHONPATH"
ENV OTB_APPLICATION_PATH="/work/otb/superbuild_install/lib/otb/applications"
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/work/otb/superbuild_install/lib/:/work/tf/installdir/lib/"
# ----------------------------------------------------------------------------
# Add one user
# ----------------------------------------------------------------------------
RUN useradd -s /bin/bash -m otbuser
USER otbuser
WORKDIR /home/otbuser
# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------
RUN rm -rf /tmp/* /root/.cache && apt-get clean
# ----------------------------------------------------------------------------
# Exemple :
# docker build --tag otbtf_image
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment