build-docker 457 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # cd into the directory containing this script (from the bash faq 028)
  3. if [[ $BASH_SOURCE = */* ]]; then
  4. cd -- "${BASH_SOURCE%/*}/" || exit
  5. fi
  6. if [ "`type -t docker`" != "" ]; then
  7. docker="docker"
  8. elif [ "`type -t podman`" != "" ]; then
  9. docker="podman"
  10. else
  11. echo "Cannot find either docker or podman" >&2
  12. exit 1
  13. fi
  14. ./clone-repos || exit 1
  15. cd ..
  16. $docker build $* -t ${SIGMA_RS_DOCKER_PREFIX}sigma-rs -f Scripts/Dockerfile .