1
0
mirror of https://github.com/rancher/os.git synced 2025-08-25 01:39:15 +00:00
os/scripts/package-installer
Sven Dowideit cc78ff7bd1 make the iso run also get the ssh and cloud-init so testing the installer is easier
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-01-15 23:40:16 +00:00

29 lines
863 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-${KERNEL_VERSION} ] || [ ! -f dist/artifacts/initrd ]; then
exit 0
fi
mkdir -p ./scripts/installer/build
cp ./dist/artifacts/initrd ./scripts/installer/build
cp ./dist/artifacts/vmlinuz-${KERNEL_VERSION} ./scripts/installer/build
cp ./bin/ros ./scripts/installer/build
trap "rm -rf ./scripts/installer/build" EXIT
docker build \
-t ${OS_REPO}/os:${VERSION}${SUFFIX} \
--build-arg VERSION=${VERSION} \
--build-arg KERNEL_VERSION=${KERNEL_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}