2024-06-20 18:52:12 +00:00
|
|
|
#!/bin/bash
|
2024-06-23 13:32:23 +00:00
|
|
|
ZFOLDER=~/Zenith
|
2024-06-26 15:55:31 +00:00
|
|
|
IMAGE_NAME=zenith-docker:0.6.0.0x
|
|
|
|
|
|
|
|
for i in "$@"
|
|
|
|
do case $i in
|
|
|
|
-e=*|--expert=*)
|
|
|
|
EXPERTMODE="1"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
EXPERTMODE="0"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2024-06-20 18:52:12 +00:00
|
|
|
|
|
|
|
# Check if data folder exists
|
|
|
|
if [ ! -d "$ZFOLDER" ]; then
|
|
|
|
echo "Error starting Zenith image"
|
|
|
|
echo "Zenith configurtion and data folder ($ZFOLDER) does not exists."
|
|
|
|
echo "Aborting process..."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Check if the image exists locally
|
|
|
|
if [[ "$(docker images -q $IMAGE_NAME 2> /dev/null)" == "" ]]; then
|
|
|
|
echo "Error starting Zenith image"
|
|
|
|
echo "Image $IMAGE_NAME not found locally."
|
|
|
|
echo "Aborting process..."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2024-06-26 15:55:31 +00:00
|
|
|
docker run --rm -it --mount src=$ZFOLDER,target=/home/zenith,type=bind --net=host --env DISPLAY=$DISPLAY --env EXPERT_MODE=$EXPERTMODE $IMAGE_NAME
|
2024-06-20 18:52:12 +00:00
|
|
|
|
2024-06-26 15:55:31 +00:00
|
|
|
# End
|