Blame view

docker/PYROS_DOCKER_BUILD 639 Bytes
2be8242a   Etienne Pallier   Ajout du shebang ...
1
#!/usr/bin/env bash
3552b2ad   Alexis Koralewski   Add new shell scr...
2

80d242ea   Etienne Pallier   ajout condition g...
3
# Git clone guitastro
8ca1d24c   Etienne Pallier   quelques commenta...
4
#
80d242ea   Etienne Pallier   ajout condition g...
5
6
7
# 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...
3552b2ad   Alexis Koralewski   Add new shell scr...
8
[ ! -d "../vendor/guitastro/" ] && git clone https://gitlab.irap.omp.eu/guitastrolib/guitastro.git ../vendor/guitastro/
80d242ea   Etienne Pallier   ajout condition g...
9
[ ! -d "../vendor/guitastro/" ] && echo "Error : git clone of GuitAstro failed => cannot go on with the build" && exit 1
3552b2ad   Alexis Koralewski   Add new shell scr...
10
11
12

export CURRENT_UID=$(id -u) 

aa66d59c   Etienne Pallier   comments in docke...
13
14
15
16
# exit if root
if [ $CURRENT_UID -eq 0 ] ; then
    echo "You can't run this script as root, use a normal user"
    exit 1
3552b2ad   Alexis Koralewski   Add new shell scr...
17
18
fi

aa66d59c   Etienne Pallier   comments in docke...
19
20
# BUILD
docker compose build