1
0
mirror of https://github.com/rancher/os.git synced 2025-06-27 23:36:49 +00:00
os/scripts/package-installer

22 lines
669 B
Plaintext
Raw Normal View History

2016-06-07 06:00:15 +00:00
#!/bin/bash
set -e
cd $(dirname $0)/..
source ./scripts/version
DOCKERFILE=./scripts/installer/Dockerfile.${ARCH}
2016-06-13 21:30:21 +00:00
if [ ! -f $DOCKERFILE ] || [ ! -f dist/artifacts/vmlinuz ] || [ ! -f dist/artifacts/initrd ]; then
2016-06-30 05:09:37 +00:00
exit 0
2016-06-07 06:00:15 +00:00
fi
mkdir -p ./scripts/installer/build
cp ./dist/artifacts/{initrd,vmlinuz} ./scripts/installer/build
trap "rm -rf ./scripts/installer/build" EXIT
2016-06-13 23:33:07 +00:00
docker build -t ${OS_REPO}/os:${VERSION}${SUFFIX} --build-arg VERSION=${VERSION} -f $DOCKERFILE ./scripts/installer
2016-08-28 15:46:03 +00:00
docker save -o dist/artifacts/installer.tar ${OS_REPO}/os:${VERSION}${SUFFIX}
echo ${OS_REPO}/os:${VERSION}${SUFFIX} >> dist/images
2016-06-07 06:00:15 +00:00
echo Built ${OS_REPO}/os:${VERSION}${SUFFIX}