live-iso-kde/generate_roofs_from_nestv3_docker.sh
2024-08-10 17:20:06 +03:00

34 lines
684 B
Bash
Executable File

#! /bin/bash
set -e
source ./info.sh
mkdir -p "$ROOTFS_PATH"
mkdir -p "$LIVE_BOOT_DATA_PATH"
mkdir -p "$LIVE_BOOT_LIVE_PATH"
# Pull and mount docker image
podman --storage-driver=vfs pull ghcr.io/pikaos-linux/pikaos-base:nestv3
podman --storage-driver=vfs image mount pikaos-linux/pikaos-base:nestv3 > ./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 $LIVE_HOSTNAME | tee "$ROOTFS_PATH/etc/hostname"