live-iso-gnome/generate_roofs_from_canaryv3_docker.sh

36 lines
738 B
Bash
Raw Normal View History

2024-08-01 01:32:19 +02:00
#! /bin/bash
set -e
2024-08-01 14:23:17 +02:00
source ./info.sh
2024-08-01 01:32:19 +02:00
2024-08-01 14:23:17 +02:00
mkdir -p "$ROOTFS_PATH"
2024-08-01 01:32:19 +02:00
2024-08-01 18:16:30 +02:00
mkdir -p "$LIVE_BOOT_DATA_PATH"
mkdir -p "$LIVE_BOOT_LIVE_PATH"
2024-08-01 01:32:19 +02:00
# Pull and mount docker image
2024-08-01 14:37:56 +02:00
podman --storage-driver=vfs pull ghcr.io/pikaos-linux/pikaos-base:canaryv3
2024-08-01 01:32:19 +02:00
2024-08-01 14:37:56 +02:00
podman --storage-driver=vfs image mount pikaos-linux/pikaos-base:canaryv3 > ./docker-merged-path
2024-08-01 01:32:19 +02:00
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/apt/apt.conf.d/*docker*
2024-08-01 01:32:19 +02:00
rm -rfv $ROOTFS_PATH/etc/dpkg/dpkg.cfg.d/*docker*
# Setup hostname
2024-08-01 14:23:17 +02:00
echo $LIVE_HOSTNAME | tee "$ROOTFS_PATH/etc/hostname"