mirror of
https://github.com/rancher/os.git
synced 2025-06-24 05:57:03 +00:00
22 lines
668 B
Bash
Executable File
22 lines
668 B
Bash
Executable File
#!/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}
|