# Football System - Complete Docker Build
# Entire build process runs inside Docker - no host dependencies needed

FROM debian:trixie

# Environment
ENV DEBIAN_FRONTEND=noninteractive

# Install ALL required build tools
RUN apt-get update && \
    apt-get install -y \
    # Build tools
    debootstrap \
    qemu-utils \
    qemu-system-x86 \
    qemu-system-common \
    qemu-system-gui \
    qemu-system-x86 \
    kpartx \
    squashfs-tools \
    parted \
    dosfstools \
    # GRUB and boot tools
    grub2-common \
    grub-efi-amd64 \
    grub-efi-amd64-bin \
    grub-pc-bin \
    grub-common \
    shim-signed \
    shim-signed-common \
    # System tools
    bash \
    coreutils \
    util-linux \
    # WireGuard
    wireguard-tools \
    # Other tools
    ca-certificates \
    curl \
    wget \
    git && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Create build directory
WORKDIR /build

# Copy build files
COPY config/ chroot-overlay/ *.sh /build/

# Create output directory
RUN mkdir -p /build/output

# Default command
CMD ["/bin/bash"]
