forked from intel/intel-qs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker_build
More file actions
executable file
·32 lines (28 loc) · 795 Bytes
/
docker_build
File metadata and controls
executable file
·32 lines (28 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
check_if_container_exists () {
if test ! -z "$(docker ps -q --filter ancestor=qhipster)"; then
mapfile -t my_array < <(docker ps -q --filter ancestor=qhipster)
declare -p my_array
echo "${my_array[0]}"
# command docker exec -it "${my_array[0]}" /bin/bash
# build_iqs_in_container
else
docker run -t -d qhipster
container_id=$(docker ps -q --filter ancestor=qhipster)
echo $container_id
# command docker exec -it $container_id /bin/bash
# build_iqs_in_container
fi
}
#build_iqs_in_container () {
#CXX=g++ cmake -DEnableMPI=OFF -DIqsUtest=ON -DIqsPython=OFF ..
#make
#}
if test ! -z "$(docker images -q qhipster)"; then
echo "already exists"
check_if_container_exists
else
echo "doesnt exist"
docker build --tag=qhipster .
check_if_container_exists
fi