Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
docker: use dpkg-shlibdeps to not uninstall the dependencies of libsimgrid.so
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 24 Aug 2018 11:36:05 +0000 (13:36 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 24 Aug 2018 12:12:21 +0000 (14:12 +0200)
tools/docker/Dockerfile.stable
tools/docker/Dockerfile.unstable

index 655dab8..3d35303 100644 (file)
@@ -11,10 +11,13 @@ RUN echo "DOWNLOAD_URL: ${DLURL}" && \
     wget https://framagit.org/${DLURL} && \
     tar xf SimGrid-* && rm SimGrid-*tar.gz && \
     cd SimGrid-* && \
-    apt install -y gcc g++ default-jdk gfortran libboost-dev libboost-all-dev cmake valgrind libboost-coroutine1.62.0 && \
+    apt install -y g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev cmake dpkg-dev && \
     cmake -DCMAKE_INSTALL_PREFIX=/usr/ -Denable_documentation=OFF -Denable_java=ON -Denable_smpi=ON -Denable_compile_optimizations=ON . && \
-    make -j4 install && make clean && \
-    apt remove -y  gcc g++ default-jdk gfortran libboost-dev libboost-all-dev cmake wget gdb valgrind && \
+    make -j4 && \
+    mkdir debian/ && touch debian/control && dpkg-shlibdeps --ignore-missing-info lib/*.so -llib/ -O/tmp/deps && \
+    make install && make clean && \
+    apt remove -y  g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev cmake dpkg-dev wget && \
+    apt install `sed -e 's/shlibs:Depends=//' -e 's/([^)]*)//g' -e 's/,//g' /tmp/deps` && \
     apt autoremove -y && apt autoclean && apt clean
 
     
\ No newline at end of file
index 0d1c955..0262d91 100644 (file)
@@ -1,14 +1,17 @@
 # Base image 
 FROM debian:testing
 
-# - Install SimGrid's dependencies
-# - Compile and install SimGrid itself
+# - Install SimGrid's dependencies 
+# - Compile and install SimGrid itself. Clean the tree.
+# - Remove everything that was installed, and re-install what's needed by the SimGrid libraries before the Gran Final Cleanup
 RUN apt update && \
-    apt install -y g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev cmake libboost-coroutine1.62.0 && \
+    apt install -y g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev cmake dpkg-dev && \
     mkdir /src/ && cd /src && git clone --depth=1 https://framagit.org/simgrid/simgrid.git simgrid.git && \
     cd simgrid.git && \
     cmake -DCMAKE_INSTALL_PREFIX=/usr/ -Denable_documentation=OFF -Denable_java=ON -Denable_smpi=ON -Denable_compile_optimizations=ON . && \
     make -j4 install && \
+    mkdir debian/ && touch debian/control && dpkg-shlibdeps --ignore-missing-info lib/*.so -llib/ -O/tmp/deps && \
     git reset --hard master && git clean -dfx && \
-    apt remove -y  g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev cmake gdb && \
+    apt remove -y  g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev cmake dpkg-dev && \
+    apt install `sed -e 's/shlibs:Depends=//' -e 's/([^)]*)//g' -e 's/,//g' /tmp/deps` && \
     apt autoremove -y && apt autoclean && apt clean