-
Notifications
You must be signed in to change notification settings - Fork 258
/
runOpRp.sh
executable file
·33 lines (29 loc) · 780 Bytes
/
runOpRp.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
#!/bin/bash
# Check if running on mac
if [ "$(uname)" = "Darwin" ]; then
# Check so the boot2docker vm is running
if [ "$(boot2docker status)" != "running" ]; then
boot2docker start
fi
boot2docker shellinit
HOST_IP=$(boot2docker ip)
else
# if running on linux
if [ "$(id -u)" -ne 0 ]; then
sudo="sudo"
fi
HOST_IP=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | grep -v '172.17' | cut -d: -f2 | awk '{ print $1}' | head -1)
fi
echo "HOST IP: " "${HOST_IP}"
${sudo} docker run -d \
--name op \
-p 8092:8092 \
-e HOST_IP="${HOST_IP}" \
-i -t \
itsdirg/pyoidc_example_op
${sudo} docker run -d \
--name rp \
-p 8666:8666 \
-e HOST_IP="${HOST_IP}" \
-i -t \
itsdirg/pyoidc_example_rp