1
0
mirror of https://github.com/rancher/os.git synced 2025-09-27 05:32:58 +00:00
Files
os/scripts/package-installer

29 lines
863 B
Plaintext
Raw Normal View History

2016-06-06 23:00:15 -07:00
#!/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
2016-06-29 22:09:37 -07:00
exit 0
2016-06-06 23:00:15 -07:00
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
2016-06-06 23:00:15 -07:00
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
2016-08-28 08:46:03 -07:00
docker save -o dist/artifacts/installer.tar ${OS_REPO}/os:${VERSION}${SUFFIX}
echo ${OS_REPO}/os:${VERSION}${SUFFIX} >> dist/images
2016-06-06 23:00:15 -07:00
echo Built ${OS_REPO}/os:${VERSION}${SUFFIX}