-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-run.sh
23 lines (23 loc) · 1.03 KB
/
docker-run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
experiment=$1
LIMIT=$2
# IFS=$'\n'
# Stop the container from previous experiments
docker stop exrunner-container
# Remove old containers
docker rm exrunner-container
# Remove previous docker image
docker rmi tudelft/exrunner
# Build a new docker image
docker image build -t tudelft/exrunner $(pwd)
# Execution
# After building the the image, we run the container
docker run -dit --name exrunner-container \
--mount type=bind,source="$(pwd)/$experiment/consoleLog",target=/reproduction/$experiment/consoleLog \
--mount type=bind,source="$(pwd)/$experiment/logs",target=/reproduction/$experiment/logs \
--mount type=bind,source="$(pwd)/$experiment/results",target=/reproduction/$experiment/results \
--mount type=bind,source="$(pwd)/crashes",target=/reproduction/crashes \
--mount type=bind,source="$(pwd)/bins",target=/reproduction/bins \
tudelft/exrunner
# Execute main.sh in the running container
docker exec -it exrunner-container bash -c "cd $experiment; bash main.sh $LIMIT > consoleLog/consoleOut.txt 2> consoleLog/consoleErr.txt"
echo "Done!"