# Dockerfile — Basalt Linux Build Environment
# Based on Debian Trixie (matches target distribution)

FROM debian:trixie-slim

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
    live-build \
    debootstrap \
    squashfs-tools \
    xorriso \
    isolinux \
    syslinux \
    syslinux-common \
    syslinux-efi \
    grub-efi-amd64-bin \
    grub-pc-bin \
    cpio \
    rsync \
    curl \
    wget \
    git \
    apt-utils \
    ca-certificates \
    sudo \
    && rm -rf /var/lib/apt/lists/*

# Non-root user with passwordless sudo (required by live-build)
RUN useradd -m user && \
    echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

WORKDIR /workspace
CMD ["bash"]
