This repository was archived by the owner on Jun 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup.bash
More file actions
executable file
·47 lines (44 loc) · 1.56 KB
/
startup.bash
File metadata and controls
executable file
·47 lines (44 loc) · 1.56 KB
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
IMAGE_PULLED=$(docker image ls | tail -n +2)
if [ -z "$IMAGE_PULLED" ];
then
echo "Pulling KitClient image..."
docker pull registry.gitlab.com/hfossedu/kits/kitclient:latest
echo "Pulled."
echo ""
fi
CONTAINER_EXISTS=$(docker ps -a | grep "KitClient")
if [ -z "$CONTAINER_EXISTS" ];
then
echo "Creating KitClient container..."
docker create --name KitClient -p 6901:6901 -p 5901:5901 registry.gitlab.com/hfossedu/kits/kitclient:latest
echo "Created."
echo ""
fi
CONTAINER_RUNNING=$(docker ps | grep "KitClient")
if [ -z "$CONTAINER_RUNNING" ];
then
echo "Starting KitClient container"
docker start KitClient
gp ports await 5901 > /dev/null
gp ports await 6901 > /dev/null
echo "Started."
echo ""
echo ""
echo "*********************************************************************************"
echo "*********************************************************************************"
echo ""
echo "Connect to the KitClient with your browser at:"
gp url 6901
echo ""
echo "*********************************************************************************"
echo "*********************************************************************************"
echo ""
echo ""
echo "Alternatively you can connect via a VNC client on your machine using the following commands:"
SSH_URL=$(gp ssh | cut -f2 -d' ')
echo " Run the following command in a terminal:"
echo " ssh -L 5901:localhost:5901 $SSH_URL"
echo " Connect your VNC Client to:"
echo " localhost:5901"
echo ""
fi