#!/usr/bin/env bash set -eu if [ $# -ne 0 ]; then echo "no arguments allowed for ${0##*/}, given: $*" >&2 exit 64 fi bindir=$( cd "${BASH_SOURCE[0]%/*}" && pwd ) # shellcheck source=_docker.sh . "$bindir"/_docker.sh # shellcheck source=_tag.sh . "$bindir"/_tag.sh # shellcheck source=_os.sh . "$bindir"/_os.sh if [ "$DOCKER_TARGET" = 'multi-arch' ]; then echo "DOCKER_TARGET may not be set to 'multi-arch' with $0" >&2 exit 1 fi dir=$( cd "$bindir"/../policy-controller && pwd ) arch=$(architecture) docker_build policy-controller "${TAG:-$(head_root_tag)}" "$dir/$arch.dockerfile"