sandcastle-ng

Scripts for the deployment of Sandcastle (GNU Taler)
Log | Files | Refs | README

sandcastle-build (717B)


      1 #!/usr/bin/env bash
      2 
      3 set -eu
      4 
      5 no_cache=
      6 while [[ $# -gt 0 ]]; do
      7   case $1 in
      8   --no-cache) no_cache=--no-cache ;;
      9   *)
     10     echo "Unknown option '$1'"
     11     exit 1
     12     ;;
     13   esac
     14   shift
     15 done
     16 
     17 CONTAINERFILE="${1:-Dockerfile}"
     18 [ $# -gt 0 ] && shift
     19 
     20 SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
     21 
     22 cd "$SCRIPT_DIR"
     23 
     24 if [ ! -r "${CONTAINERFILE}" ]; then
     25   echo >&2 "Containerfile '${CONTAINERFILE}' not found or not readable."
     26   exit 1
     27 fi
     28 echo "Building with containerfile: ${CONTAINERFILE}"
     29 # The nofile ulimit is required to prevent fakeroot from becoming sluggish.
     30 exec podman build $no_cache --ulimit=nofile=2048:2048 -f "${CONTAINERFILE}" \
     31   --target taler-final -t taler-base-all "$@" .