package-installer 712 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. set -e
  3. cd $(dirname $0)/..
  4. source ./scripts/version
  5. DOCKERFILE=./scripts/installer/Dockerfile.${ARCH}
  6. if [ ! -f $DOCKERFILE ] || [ ! -f dist/artifacts/vmlinuz ] || [ ! -f dist/artifacts/initrd ]; then
  7. echo "Error: ${DOCKERFILE}, dist/artifacts/vmlinuz or dist/artifacts/initrd is missing"
  8. exit 1
  9. fi
  10. mkdir -p ./scripts/installer/build
  11. cp ./dist/artifacts/{initrd,vmlinuz} ./scripts/installer/build
  12. echo VERSION=$VERSION > ./scripts/installer/build/build.conf
  13. trap "rm -rf ./scripts/installer/build" EXIT
  14. docker build -t ${OS_REPO}/os:${VERSION}${SUFFIX} -f $DOCKERFILE ./scripts/installer
  15. echo ${OS_REPO}/os:${VERSION}${SUFFIX} > dist/images
  16. echo Built ${OS_REPO}/os:${VERSION}${SUFFIX}