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