-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.sh
executable file
·38 lines (29 loc) · 836 Bytes
/
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#https://hub.docker.com/r/jbrowse/gmod-jbrowse/
set -xeu
USER_ID=`id -u $USER`
if [[ ! -f "config" ]]; then
echo "NO CONFIG. copying example"
if [[ -f "config.example" ]]; then
echo "COPYING EXAMPLE"
cp config.example config
else
echo "NO EXAMPLE. please create manually"
exit 1
fi
else
echo "HAS CONFIG"
fi
source config
#find . -type d -exec chmod 777 {} \; &>/dev/null
docker stop ${NAME} || true
docker rm ${NAME} || true
chmod 777 data
docker run --rm -it \
--name ${NAME} \
--env "USER_ID=${USER_ID}" \
--env "INST_NAME=${NAME}" \
--env "INDEX_FILES=${INDEX_FILES}" \
-v ${PWD}/data/:/jbrowse/data/ \
-v ${PWD}/data/:/data/:Z \
-p ${PORT}:80 ${IMG} $@ | tee -a runs.log