-# Base image
-FROM debian:testing
+# Rebuild with this image with the following commande:
+# docker build -f Dockerfile.tuto-mc -t simgrid/tuto-mc .
+# Launch it as follows:
+# docker run -it simgrid/tuto-mc bash
-RUN apt update && apt -y upgrade
+# Base image
+FROM debian:testing
-RUN apt install -y sudo && \
- groupadd -g 999 user && \
- useradd -u 999 -g user user && \
- echo "user ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/user && \
- chmod 0440 /etc/sudoers.d/user && \
- mkdir -p /home/user && \
- chown -R user:user /home/user
+RUN apt update && apt -y upgrade
-# - Install SimGrid's dependencies
+# - Install SimGrid's dependencies
# - Compile and install SimGrid itself.
+# - Get the tutorial files (with an empty makefile advising to run cmake before make, just in case)
# - Remove everything that was installed, and re-install what's needed by the SimGrid libraries before the Gran Final Cleanup
# - Keep g++ gcc gfortran as any MC user will use (some of) them
-RUN apt install -y g++ gcc git valgrind gfortran libboost-dev libboost-all-dev cmake dpkg-dev libunwind-dev libdw-dev libelf-dev libevent-dev && \
+RUN apt install -y g++ gcc git valgrind gfortran libboost-dev libeigen3-dev libboost-stacktrace-dev cmake dpkg-dev libunwind-dev libdw-dev libelf-dev libevent-dev python3-dev && \
mkdir /source/ && cd /source && git clone --depth=1 https://framagit.org/simgrid/simgrid.git simgrid.git && \
cd simgrid.git && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/ -Denable_model-checking=ON -Denable_documentation=OFF -Denable_java=OFF -Denable_smpi=ON -Denable_compile_optimizations=ON . && \
- make -j4 install && \
- chown -R user:user /source && \
+ make -j6 install && \
+ git clone --depth=1 https://framagit.org/simgrid/tutorial-model-checking /source/tuto-mc.git && \
+ printf "ndet-receive-s4u:\n\t@echo \"Please run the following command before make:\";echo \" cmake .\"; exit 1" > /source/tuto-mc.git/Makefile &&\
mkdir debian/ && touch debian/control && dpkg-shlibdeps --ignore-missing-info lib/*.so -llib/ -O/tmp/deps && \
- apt remove -y git valgrind libboost-dev libboost-all-dev cmake dpkg-dev libunwind-dev libdw-dev libelf-dev libevent-dev && \
+ apt remove -y dpkg-dev libunwind-dev libdw-dev libelf-dev libevent-dev && \
apt install -y `sed -e 's/shlibs:Depends=//' -e 's/([^)]*)//g' -e 's/,//g' /tmp/deps` && rm /tmp/deps && \
apt autoremove -y && apt autoclean && apt clean
-USER user
-
-# The build and dependencies are not cleaned in this image since it's it's highly experimental so far
+# The build and dependencies are not cleaned in this image since it's it's experimental so far
# git reset --hard master && git clean -dfx && \
+
+CMD ["/bin/bash"]