build-images 547 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. set -e
  3. export ARCH=${ARCH:-"amd64"}
  4. BASE=images
  5. source $(dirname $0)/version
  6. cd $(dirname $0)/..
  7. for i in $BASE/[0-9]*; do
  8. name="os-$(echo ${i} | cut -f2 -d-)"
  9. tag="${OS_REPO}/${name}:${VERSION}${SUFFIX}"
  10. echo Building ${tag}
  11. if [ -x ${i}/prebuild.sh ]; then
  12. ${i}/prebuild.sh
  13. fi
  14. if dapper -d --build -f ${i}/Dockerfile -- -t rancher/${name} ${i}; then
  15. docker tag rancher/${name} ${tag}
  16. elif [ "$?" != "42" ]; then
  17. exit 1
  18. else
  19. echo "WARN: Skipping ${tag}"
  20. fi
  21. done