Files
eco_os/isobuild/scripts/docker-build.sh
2026-01-08 12:28:54 +00:00

35 lines
733 B
Bash
Executable File

#!/bin/bash
#
# Build EcoOS ISO using Docker
# This avoids needing to install live-build on the host
#
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ISOBUILD_DIR="$(dirname "$SCRIPT_DIR")"
ECO_OS_DIR="$(dirname "$ISOBUILD_DIR")"
echo "=== EcoOS ISO Builder (Docker) ==="
echo ""
cd "$ECO_OS_DIR"
# Build the Docker image
echo "[1/2] Building Docker image..."
docker build -t ecoos-builder -f isobuild/Dockerfile .
# Run the build
echo ""
echo "[2/2] Building ISO (this may take 15-30 minutes)..."
mkdir -p "$ISOBUILD_DIR/output"
docker run --rm \
--privileged \
-v "$ISOBUILD_DIR/output:/output" \
ecoos-builder
echo ""
echo "=== Build Complete ==="
echo "ISO: $ISOBUILD_DIR/output/ecoos.iso"