12345678910111213141516171819202122 |
- #!/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
- exit 0
- fi
- mkdir -p ./scripts/installer/build
- cp ./dist/artifacts/{initrd,vmlinuz} ./scripts/installer/build
- trap "rm -rf ./scripts/installer/build" EXIT
- docker build -t ${OS_REPO}/os:${VERSION}${SUFFIX} --build-arg VERSION=${VERSION} -f $DOCKERFILE ./scripts/installer
- docker save -o dist/artifacts/installer.tar ${OS_REPO}/os:${VERSION}${SUFFIX}
- echo ${OS_REPO}/os:${VERSION}${SUFFIX} > dist/images
- echo Built ${OS_REPO}/os:${VERSION}${SUFFIX}
|