1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

Add SYSTEM_DOCKER_URL env

This commit is contained in:
niusmallnan
2018-02-27 18:01:30 +08:00
committed by niusmallnan
parent 43f483a5ef
commit c5f1b28af8
2 changed files with 12 additions and 4 deletions

View File

@@ -13,11 +13,11 @@ cp bin/ros ${INITRD_DIR}/usr/bin/
ln -s usr/bin/ros ${INITRD_DIR}/init
ln -s bin ${INITRD_DIR}/usr/sbin
ln -s usr/sbin ${INITRD_DIR}/sbin
ln -s ros ${INITRD_DIR}/usr/bin/system-docker
ln -s ros ${INITRD_DIR}/usr/bin/docker-runc
ln -s ../../../../usr/bin/ros ${INITRD_DIR}/usr/var/lib/cni/bin/bridge
ln -s ../../../../usr/bin/ros ${INITRD_DIR}/usr/var/lib/cni/bin/host-local
curl -SL ${!SYSTEM_DOCKER_URL} | tar --strip-components=1 -xzvf - -C ${INITRD_DIR}/usr/bin/
cat <<HERE > ${INITRD_DIR}/usr/share/ros/os-release
NAME="RancherOS"
VERSION=${VERSION}
@@ -31,7 +31,8 @@ BUG_REPORT_URL="https://github.com/rancher/os/issues"
BUILD_ID=
HERE
# TODO: usr/lib dir is overwritten by the kernel modules and firmware
ln -s ../share/ros/os-release ${INITRD_DIR}/usr/lib/
ln -s ${INITRD_DIR}/usr/share/ros/os-release ${INITRD_DIR}/usr/lib/
ln -s ${INITRD_DIR}/usr/share/ros/os-release ${INITRD_DIR}/usr/etc/
# Support upgrades from old persistent consoles that bind mount these
touch ${INITRD_DIR}/usr/bin/docker-containerd