File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Check if the operating system is macOS
4
+ if [[ " $( uname) " != " Darwin" ]]; then
5
+ echo " This script is designed to run on macOS only."
6
+ exit 1
7
+ fi
8
+
9
+ # Check if XQuartz is installed
10
+ if ! command -v Xquartz & > /dev/null && ! command -v xterm & > /dev/null; then
11
+ echo " XQuartz is not installed."
12
+ echo " You can install XQuartz from: https://www.xquartz.org/"
13
+ echo " After installation, please rerun this script."
14
+ exit 1
15
+ fi
16
+
17
+ echo " Launching XQuartz (if not open already)..."
18
+ open -a XQuartz
19
+ sleep 2
20
+ echo " Configuring xhost for localhost"
21
+ xterm -e " xhost +localhost"
22
+ sleep 2
23
+ echo " Killing any xterm sessions..."
24
+ pkill -x xterm
25
+ echo " Done"
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ if [[ "$(docker images -q ${IMAGE_TAG} 2> /dev/null)" == "" ]]; then
32
32
docker build --pull --build-arg GIT_REPO=${GIT_REPO} --target ${IMAGE_TARGET} -t ${IMAGE_TAG} .
33
33
fi
34
34
35
+ ./launch_X.sh
36
+
35
37
# run container if not created, otherwise attach to existing
36
38
if [[ " $( docker container ls -qa --filter name=${CONTAINER_NAME} 2> /dev/null) " == " " ]]; then
37
39
echo " Creating and running container..."
You can’t perform that action at this time.
0 commit comments