2019-03-06 15:39:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Create workdir
|
|
|
|
XP_FOLDER=`mktemp -d -p . xp1-XXXXXXXXXXXXXXXX`
|
|
|
|
mkdir -p $XP_FOLDER
|
|
|
|
cd $XP_FOLDER
|
|
|
|
|
|
|
|
# Create folders
|
2019-03-06 17:32:19 +00:00
|
|
|
docker run \
|
|
|
|
--rm \
|
|
|
|
-ti \
|
|
|
|
-v `pwd`:/mnt \
|
|
|
|
ubuntu \
|
|
|
|
bash -c "cd /mnt; mkdir -p ./{shared,log,res}; chown -R 1000 ./{shared,log,res}"
|
2019-03-06 15:39:39 +00:00
|
|
|
|
|
|
|
# Run server
|
|
|
|
docker run \
|
|
|
|
--privileged \
|
|
|
|
--rm \
|
|
|
|
-v `pwd`/shared:/home/donar/shared \
|
|
|
|
-v `pwd`/log:/home/donar/log \
|
|
|
|
registry.gitlab.inria.fr/qdufour/donar \
|
|
|
|
xp1-server &
|
|
|
|
|
|
|
|
sleep 30
|
|
|
|
|
|
|
|
# Run client
|
|
|
|
docker run \
|
|
|
|
--privileged \
|
|
|
|
--rm \
|
|
|
|
-v `pwd`/res:/home/donar/res \
|
|
|
|
-v `pwd`/shared:/home/donar/shared \
|
|
|
|
-v `pwd`/log:/home/donar/log \
|
|
|
|
registry.gitlab.inria.fr/qdufour/donar \
|
|
|
|
xp1-client $1 $2 $3
|
|
|
|
|
|
|
|
# Kill server
|
|
|
|
kill %1
|
2019-03-06 17:32:19 +00:00
|
|
|
|