mirror of
https://github.com/rancher/os.git
synced 2025-06-20 20:21:54 +00:00
1. Fix a bug where install to a nvme disk 2. Remove unused code 3. Move cache services logic to os installer
29 lines
504 B
Bash
Executable File
29 lines
504 B
Bash
Executable File
#!/bin/sh
|
|
set -e -x
|
|
|
|
root="/mnt/install"
|
|
cache="/var/lib/rancher/cache"
|
|
preload="/var/lib/rancher/preload/system-docker"
|
|
|
|
partition=$1
|
|
images=$2
|
|
|
|
cache_services() {
|
|
mkdir -p ${root}${cache}
|
|
cp ${cache}/* ${root}${cache}
|
|
}
|
|
|
|
cache_images() {
|
|
mkdir -p ${root}${preload}
|
|
for i in ${images}; do
|
|
system-docker pull $i
|
|
done
|
|
system-docker save -o ${root}${preload}/os-include.tar ${images}
|
|
}
|
|
|
|
mkdir -p ${root}
|
|
mount ${partition} ${root}
|
|
cache_services
|
|
cache_images
|
|
umount ${root}
|