-
Notifications
You must be signed in to change notification settings - Fork 2
/
startEclipseForCoraNoPorts.sh
executable file
·54 lines (51 loc) · 1.68 KB
/
startEclipseForCoraNoPorts.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
46
47
48
49
50
51
52
53
54
#! /bin/bash
#USER=$1
USER=$(id -u -n)
BASEDIR=$(dirname $BASH_SOURCE)
echo
echo starting eclipse using:
echo userName: $USER
echo
echo "Testing for container runtimes...."
CONTAINERRUNTIME=podman;
DOCKER_EXISTS=$(command -v docker)
echo "Docker size: "${#DOCKER_EXISTS}
if [ ${#DOCKER_EXISTS} -gt 0 ]; then
CONTAINERRUNTIME=docker;
fi
echo "Container runtime will be "${CONTAINERRUNTIME}
if [ ! $USER ]; then
echo "You must specify the userName used when starting eclipse202409forcora2"
else
#${CONTAINERRUNTIME} run --rm -ti --privileged --ipc=host --env="QT_X11_NO_MITSHM=1" -e DISPLAY=$DISPLAY \
cd eclipse202409forcora2
${CONTAINERRUNTIME} run --rm -ti --privileged --ipc=host \
--env="QT_X11_NO_MITSHM=1"\
--env="NO_AT_BRIDGE=1"\
-e DISPLAY=$DISPLAY \
-e XDG_RUNTIME_DIR=/tmp \
-e WAYLAND_DISPLAY=$WAYLAND_DISPLAY \
-v $XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/tmp/$WAYLAND_DISPLAY \
-v /var/run/docker.sock:/var/run/docker.sock\
-v /usr/lib64/dri:/usr/lib64/dri\
-v /tmp/.X11-unix:/tmp/.X11-unix\
-v INSTALLDIR/workspace:/home/$USER/workspace\
-v INSTALLDIR/eclipse:/home/$USER/eclipse\
-v INSTALLDIR/.eclipse:/home/$USER/.eclipse\
-v INSTALLDIR/.saros:/home/$USER/.saros\
-v PARENTDIR/m2:/home/$USER/.m2\
-v PARENTDIR/eclipseP2:/home/$USER/.p2\
-v PARENTDIR/.gitconfig:/home/$USER/.gitconfig\
-v PARENTDIR/ssh:/home/$USER/.ssh\
-v PARENTDIR/sharedArchive:/tmp/sharedArchive\
-v PARENTDIR/archiveReadable.sh:/home/$USER/archiveReadable.sh\
-e user=$USER\
-e HOSTBASEDIR=$BASEDIR\
-e sharedArchive=PARENTDIR/sharedArchive\
--volume /sys/fs/cgroup:/sys/fs/cgroup:ro \
--network=eclipseForCoraNet\
--name eclipse202409forcora2\
--network-alias=eclipse\
eclipse202409forcora2 $2
cd ../
fi