-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker_compiler.sh
executable file
·35 lines (29 loc) · 1.15 KB
/
docker_compiler.sh
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
#!/bin/bash
# © 2019 Konopnickiej.Com - Paweł 'felixd' Wojciechowski
REPO="elmarit/harbour"
TAG_DEFAULT_COMPILER="compiler_clang7"
COMPILERS=()
for DIR in *; do
if [ -d "${DIR}" ]; then
case "$DIR" in
compiler_* ) COMPILERS+=($DIR) ;;
esac
fi
done
echo "+-------------------------------------------------------------------+"
docker version
echo "+-------------------------------------------------------------------+"
echo " *** Building Compiler images for Harbour Project *** "
echo "+-------------------------------------------------------------------+"
echo " *** Compilers: ${COMPILERS[@]}"
echo "+-------------------------------------------------------------------+"
# COMPILERS
for TAG in ${COMPILERS[@]}; do
echo "+-------------------------------------------------------------------+"
echo " *** Building TAG: :$TAG *** "
echo "+-------------------------------------------------------------------+"
docker pull $REPO:$TAG || true # In case image does not exist
docker build --cache-from $REPO:$TAG --pull -t $REPO:$TAG $TAG/
done
docker tag $REPO:$TAG_DEFAULT_COMPILER $REPO:compiler
docker tag $REPO:$TAG_DEFAULT_COMPILER $REPO:compiler_default