PYROS_DOCKER_BUILD
673 Bytes
#!/usr/bin/env bash
# Git clone guitastro
#
# This could be done directly in the Dockerfile
# but it is better to do it here because if it failed during the build
# we would have to do all the build again...
[ ! -d "../vendor/guitastro/" ] && git clone https://gitlab.irap.omp.eu/guitastrolib/guitastro.git ../vendor/guitastro/
[ ! -d "../vendor/guitastro/" ] && echo "Error : git clone of GuitAstro failed => cannot go on with the build" && exit 1
export CURRENT_UID=$(id -u)
export COMPUTER_HOSTNAME=$HOSTNAME
# exit if root
if [ $CURRENT_UID -eq 0 ] ; then
echo "You can't run this script as root, use a normal user"
exit 1
fi
# BUILD
docker compose build