mirror of
https://github.com/rancher/os.git
synced 2025-06-30 16:51:47 +00:00
Bring back installer
This commit is contained in:
parent
ac0f317bf8
commit
e1d29fbab7
@ -5,4 +5,4 @@ cd $(dirname $0)
|
|||||||
|
|
||||||
./build
|
./build
|
||||||
./prepare
|
./prepare
|
||||||
COMPRESS="gzip -1" ROOTFS=0 ./package
|
INSTALLER=0 COMPRESS="gzip -1" ROOTFS=0 ./package
|
||||||
|
10
scripts/installer/Dockerfile.amd64
Normal file
10
scripts/installer/Dockerfile.amd64
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM debian:jessie
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
RUN apt-get update && apt-get install -y grub2 parted kexec-tools
|
||||||
|
|
||||||
|
COPY conf lay-down-os seed-data set-disk-partitions /scripts/installer/
|
||||||
|
COPY ./build/build.conf /scripts/
|
||||||
|
COPY ./build/vmlinuz /dist/vmlinuz
|
||||||
|
COPY ./build/initrd /dist/initrd
|
||||||
|
|
||||||
|
ENTRYPOINT ["/scripts/lay-down-os"]
|
17
scripts/installer/Dockerfile.arm64
Normal file
17
scripts/installer/Dockerfile.arm64
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM aarch64/debian:jessie
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
ENV ARCH arm
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y parted git gcc make autoconf
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/local/src && \
|
||||||
|
cd /usr/local/src && \
|
||||||
|
git clone https://git.linaro.org/people/takahiro.akashi/kexec-tools.git && \
|
||||||
|
cd kexec-tools && git checkout kdump/for-14 && ./bootstrap && ./configure && make && make install
|
||||||
|
|
||||||
|
COPY conf lay-down-os seed-data set-disk-partitions /scripts/installer/
|
||||||
|
COPY ./build/build.conf /scripts/
|
||||||
|
COPY ./build/vmlinuz /dist/vmlinuz
|
||||||
|
COPY ./build/initrd /dist/initrd
|
||||||
|
|
||||||
|
ENTRYPOINT ["/scripts/lay-down-os"]
|
@ -8,3 +8,6 @@ if [ "$ROOTFS" != "0" ]; then
|
|||||||
fi
|
fi
|
||||||
./package-initrd
|
./package-initrd
|
||||||
./package-iso
|
./package-iso
|
||||||
|
if [ "$INSTALLER" != "0" ]; then
|
||||||
|
./package-installer
|
||||||
|
fi
|
||||||
|
21
scripts/package-installer
Executable file
21
scripts/package-installer
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd $(dirname $0)/..
|
||||||
|
|
||||||
|
source ./scripts/version
|
||||||
|
|
||||||
|
DOCKERFILE=./scripts/installer/Dockerfile.${ARCH}
|
||||||
|
|
||||||
|
if [ ! -e $DOCKERFILE ] || [ ! -e dist/artifacts/vmlinuz ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p ./scripts/installer/build
|
||||||
|
cp ./dist/artifacts/{initrd,vmlinuz} ./scripts/installer/build
|
||||||
|
echo VERSION=$VERSION > ./scripts/installer/build/build.conf
|
||||||
|
trap "rm -rf ./scripts/installer/build" EXIT
|
||||||
|
|
||||||
|
docker build -t ${OS_REPO}/os:${VERSION}${SUFFIX} -f $DOCKERFILE ./scripts/installer
|
||||||
|
echo ${OS_REPO}/os:${VERSION}${SUFFIX} > dist/images
|
||||||
|
echo Built ${OS_REPO}/os:${VERSION}${SUFFIX}
|
Loading…
Reference in New Issue
Block a user