-
Notifications
You must be signed in to change notification settings - Fork 1
/
access_lab.sh
executable file
·45 lines (40 loc) · 1.07 KB
/
access_lab.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
38
39
40
41
42
43
44
45
#!/bin/bash
function run_on_mac {
docker run -it -p 8015:8000 \
-v $(pwd):/home/lab \
felix11h/docker-open-comp-rsc-popper \
/bin/bash -c \
'cd /home/lab/comp/;
screen -d -m smtweb --allips;
source ../startup_messg_linux.sh;
bash'
}
function run_on_linux {
docker run -it -p 127.0.0.1:8015:8000 \
--user="$(id -u):$(id -g)" \
-v $(pwd):/home/lab \
felix11h/docker-open-comp-rsc-popper \
/bin/bash -c \
'cd /home/lab/comp/;
screen -d -m smtweb --allips;
source ../startup_messg_linux.sh;
bash'
}
function run_on_windows {
docker run -it -p 8015:8000 \
-v $(pwd):/home/lab \
felix11h/docker-open-comp-rsc-popper \
/bin/bash -c \
'cd /home/lab/comp/;
git config core.fileMode false;
screen -d -m smtweb --allips;
source ../startup_messg_windows7.sh;
bash'
}
case "$OSTYPE" in
solaris*) ;;
darwin*) run_on_mac ;;
linux*) run_on_linux ;;
bsd*) run_on_windows ;;
*) echo "unknown: $OSTYPE" ;;
esac