mirror of
https://github.com/rancher/os.git
synced 2025-07-03 18:16:13 +00:00
21 lines
590 B
Bash
Executable File
21 lines
590 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
|
|
echo ${OS_REPO}/os:${VERSION}${SUFFIX} > dist/images
|
|
echo Built ${OS_REPO}/os:${VERSION}${SUFFIX}
|