bake.sh 617 B

123456789101112131415
  1. #!/usr/bin/env bash
  2. # Determine the basedir of this script.
  3. # It should be located in the same directory as the docker-bake.hcl
  4. # This ensures you can run this script from both inside and outside of the docker directory
  5. BASEDIR=$(RL=$(readlink -n "$0"); SP="${RL:-$0}"; dirname "$(cd "$(dirname "${SP}")" || exit; pwd)/$(basename "${SP}")")
  6. # Load build env's
  7. source "${BASEDIR}/bake_env.sh"
  8. # Be verbose on what is being executed
  9. set -x
  10. # Make sure we set the context to `..` so it will go up one directory
  11. docker buildx bake --progress plain --set "*.context=${BASEDIR}/.." -f "${BASEDIR}/docker-bake.hcl" "$@"