Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dockerfiles to build our nice images
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 22 Aug 2018 06:38:56 +0000 (08:38 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 22 Aug 2018 06:41:38 +0000 (08:41 +0200)
tools/docker/.gitignore [new file with mode: 0644]
tools/docker/Dockerfile.stable [new file with mode: 0644]
tools/docker/Dockerfile.tuto-s4u [new file with mode: 0644]
tools/docker/Dockerfile.unstable [new file with mode: 0644]
tools/docker/Makefile [new file with mode: 0644]
tools/internal/check_dist_archive.exclude

diff --git a/tools/docker/.gitignore b/tools/docker/.gitignore
new file mode 100644 (file)
index 0000000..397b4a7
--- /dev/null
@@ -0,0 +1 @@
+*.log
diff --git a/tools/docker/Dockerfile.stable b/tools/docker/Dockerfile.stable
new file mode 100644 (file)
index 0000000..9236ec0
--- /dev/null
@@ -0,0 +1,18 @@
+# Base image 
+FROM debian:testing
+
+ARG DLURL
+
+# - Install SimGrid's dependencies
+# - Compile and install SimGrid itself
+RUN echo "DOWNLOAD_URL: ${DLURL}" && \
+    apt update && apt install -y wget && \
+    wget https://framagit.org/${DLURL} && tar xf SimGrid-* && \
+    cd SimGrid-* && \
+    apt install -y gcc g++ default-jdk gfortran libboost-dev libboost-all-dev cmake valgrind libboost-coroutine1.62.0 && \
+    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 && \
+    apt autoremove -y && apt autoclean && apt clean
+
+    
\ No newline at end of file
diff --git a/tools/docker/Dockerfile.tuto-s4u b/tools/docker/Dockerfile.tuto-s4u
new file mode 100644 (file)
index 0000000..8bc81e2
--- /dev/null
@@ -0,0 +1,8 @@
+# Base image 
+FROM simgrid/unstable
+
+# - Clone simgrid-template-s4u, as it is needed by the tutorial
+RUN apt install -y pajeng r-base r-cran-ggplot2 r-cran-dplyr cmake g++ && \
+    git clone --depth=1 https://framagit.org/simgrid/simgrid-template-s4u.git
+
+    
\ No newline at end of file
diff --git a/tools/docker/Dockerfile.unstable b/tools/docker/Dockerfile.unstable
new file mode 100644 (file)
index 0000000..b6f09fd
--- /dev/null
@@ -0,0 +1,15 @@
+# Base image 
+FROM debian:testing
+
+# - Install SimGrid's dependencies
+# - Compile and install SimGrid itself
+RUN apt update && \
+    apt install -y g++ gcc git valgrind default-jdk gfortran libboost-dev libboost-all-dev libboost-coroutine1.62.0 cmake && \
+    git clone --depth=1 https://framagit.org/simgrid/simgrid.git && \
+    cd simgrid && \
+    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 default-jdk gfortran libboost-dev libboost-all-dev cmake && \
+    apt autoremove -y && apt autoclean && apt clean
+
+    
\ No newline at end of file
diff --git a/tools/docker/Makefile b/tools/docker/Makefile
new file mode 100644 (file)
index 0000000..3e489cc
--- /dev/null
@@ -0,0 +1,33 @@
+default:
+       @echo "Try make stable, make unstable, make tuto-s4u or make push."
+       @echo "Also possible: DOCKER_EXTRA=--no-cache make unstable"
+
+stable:
+       export last_tag=`wget https://framagit.org/simgrid/simgrid/tags 2>/dev/null -O - | grep /simgrid/simgrid/tags/v | head -n1  | sed 's/[^>]*>//' | sed 's/<.*//'`; \
+       export url=`wget https://framagit.org/simgrid/simgrid/tags/$${last_tag} 2>/dev/null -O - | grep SimGrid- | perl -pe 's/.*?<li><a href="//' | sed 's/tar.gz.*/tar.gz/'` ;\
+       echo URL:$${url} ; \
+       docker build -f Dockerfile.stable \
+                --build-arg DLURL=$${url} \
+                -t simgrid/stable:latest \
+                 -t simgrid/stable:$${last_tag} \
+                $(DOCKER_EXTRA) \
+                 . | tee > stable.log
+
+unstable:
+       docker build -f Dockerfile.unstable \
+                -t simgrid/unstable:latest \
+                 -t simgrid/unstable:$$(date --iso-8601) \
+                $(DOCKER_EXTRA) \
+                 . | tee > unstable.log
+
+tuto-s4u: 
+       docker build -f Dockerfile.tuto-s4u \
+                -t simgrid/tuto-s4u:latest \
+                 -t simgrid/tuto-s4u:$$(date --iso-8601) \
+                $(DOCKER_EXTRA) \
+                 . | tee > tuto.log
+
+push:
+       docker push simgrid/stable
+       docker push simgrid/unstable
+       docker push simgrid/tuto-s4u
index c1f1629..61f2bc8 100644 (file)
@@ -31,6 +31,7 @@
 + docs/source/.*
 
 + tools/appveyor-irc-notify\.py
++ tools/docker/.*
 + tools/git-hooks/.*
 + tools/internal/.*
 + tools/jenkins/.*