7 REPO_DIR="$(git rev-parse --show-toplevel 2>/dev/null)"
8 [ -z "$REPO_DIR" ] && { echo "You must execute under a valid git repository !" ; exit 1 ; }
20 local imgname=$(basename ${imgdir})
23 echo "Building ${imgname}:${imgtag} ..."
26 # Dockerfile for other contexts:
28 local preferred=Dockerfile.$(arch)
29 [ -f ${preferred} ] && { dck_opt="-f ${preferred}" ; echo "Selected '${preferred}' for current architecture." ; }
30 [ -z "${dck_opt}" -a ! -f Dockerfile ] && { echo "No Dockerfile for this directory. Ignoring ..." ; cd - >/dev/null ; return 1 ; }
32 docker build -t ${imgname}:${imgtag} ${dck_opt} .
33 [ $? -ne 0 ] && { echo "An error ocurred. Aborting ..." ; cd - >/dev/null ; return 1 ; }
42 echo "Remember usage: $0 [variant: Release|Debug], Release by default"
45 TAG=$(${REPO_DIR}/tools/version)
47 # Build compilation image:
48 build_image ${REPO_DIR}/docker-images/anna-build-nodb # this image has neither oracle nor mysql installed
50 # Build source with previous compilation image:
51 docker run --rm -it -u $(id -u):$(id -g) -e VARIANT=${VARIANT} -v ${REPO_DIR}:/code -w /code anna-build-nodb:${TAG}