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

22 lines
682 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
echo "Error: ${DOCKERFILE}, dist/artifacts/vmlinuz or dist/artifacts/initrd is missing"
exit 1
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-06-07 06:00:15 +00:00
echo ${OS_REPO}/os:${VERSION}${SUFFIX} > dist/images
echo Built ${OS_REPO}/os:${VERSION}${SUFFIX}