-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrun_docker.sh
More file actions
executable file
·41 lines (32 loc) · 802 Bytes
/
run_docker.sh
File metadata and controls
executable file
·41 lines (32 loc) · 802 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
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
exists()
{
command -v "$1" >/dev/null 2>&1
}
if exists docker-machine; then
if [ "$(docker-machine status)" != "Running" ]; then
docker-machine start
fi
eval "$(docker-machine env default)"
fi
screen -dm bash -c "./docker_drill_embedded.sh"
CID=$(docker ps | grep apache-drill | cut -d ' ' -f 1)
while [ "$CID" == "" ];
do
CID=$(docker ps | grep apache-drill | cut -d ' ' -f 1)
echo $(docker ps)
sleep 0.25
done
echo 'Docker cid' $CID
if exists docker-machine; then
PYDRILL_HOST=$(docker-machine ip)
PYDRILL_PORT=8047
else
PYDRILL_HOST='localhost'
PYDRILL_PORT=8047
fi
export CID=$CID
export PYDRILL_HOST=$PYDRILL_HOST
export PYDRILL_PORT=$PYDRILL_PORT
echo "PYDRILL_HOST:" $PYDRILL_HOST
echo "PYDRILL_PORT:" $PYDRILL_PORT