-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathrun.sh
executable file
·31 lines (26 loc) · 1020 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
#!/bin/bash
xhost +local:
CIQ_WORKSPACE=${CIQ_WORKSPACE:-`pwd`/eclipse-workspace}
CIQ_BINARIES=${CIQ_BINARIES:-`pwd`/.Garmin}
EXAMPLES_FOLDER=${EXAMPLES_FOLDER:-`pwd`/examples}
COMMAND=${COMMAND:-/bin/bash}
MAP_UID=${UID:-`id -u`}
MAP_GID=${GID:-`id -g`}
echo "CIQ_WORKSPACE is $CIQ_WORKSPACE"
echo "EXAMPLES_FOLDER is $EXAMPLES_FOLDER"
if [ -f ${CIQ_WORKSPACE}/developer_key.der ]; then
echo "Certificate keys already created"
else
echo "Generating Certificate keys"
openssl genrsa -out ${CIQ_WORKSPACE}/developer_key.pem 4096
openssl pkcs8 -topk8 -inform PEM -outform DER -in ${CIQ_WORKSPACE}/developer_key.pem -out ${CIQ_WORKSPACE}/developer_key.der -nocrypt
fi
docker run -it --rm \
-v $CIQ_WORKSPACE:/home/developer/eclipse-workspace \
-v $EXAMPLES_FOLDER:/home/developer/examples \
-v $CIQ_BINARIES:/home/developer/.Garmin \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY \
-u $MAP_UID:$MAP_GID \
--privileged \
kalemena/connectiq:latest ${COMMAND}