32 lines
614 B
Bash
32 lines
614 B
Bash
|
#! /bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
mkdir -p "./LIVE_BOOT/rootfs"
|
||
|
|
||
|
ROOTFS_PATH="./LIVE_BOOT/rootfs"
|
||
|
|
||
|
# Pull and mount docker image
|
||
|
|
||
|
podman pull ghcr.io/pikaos-linux/pikaos-base:canaryv3
|
||
|
|
||
|
podman image mount pikaos-linux/pikaos-base:canaryv3 > ./docker-merged-path
|
||
|
|
||
|
DOCKER_MERGED_PATH=$(cat ./docker-merged-path)
|
||
|
|
||
|
# Safely Copy merged path contents to rootfs
|
||
|
|
||
|
rsync -av $DOCKER_MERGED_PATH/* $ROOTFS_PATH/
|
||
|
|
||
|
# Clean up Docker specific things
|
||
|
|
||
|
rm -rfv $ROOTFS_PATH/etc/apt/preferences.d/*docker*
|
||
|
|
||
|
rm -rfv $ROOTFS_PATH/etc/dpkg/dpkg.cfg.d/*docker*
|
||
|
|
||
|
# Setup hostname
|
||
|
|
||
|
echo "pikaos" | tee "$ROOTFS_PATH/etc/hostname"
|
||
|
|
||
|
ls $ROOTFS_PATH/
|