FROM alpine:3.22

# Base tools
RUN apk add --no-cache \
    bash \
    coreutils \
    util-linux \
    tar \
    gzip \
    xz \
    cpio \
    curl \
    wget \
    ca-certificates \
    rsync \
    file \
    grep \
    gawk \
    sed \
    vim

# Filesystem + disk tools (needed by chroot-setup.sh and for Alpine install)
RUN apk add --no-cache \
    dosfstools \
    e2fsprogs \
    xfsprogs \
    btrfs-progs \
    parted \
    sfdisk \
    blkid \
    lsblk \
    wipefs \
    util-linux-misc \
    findmnt

# ISO + boot tools
RUN apk add --no-cache \
    xorriso \
    syslinux \
    mtools \
    squashfs-tools \
    libarchive-tools \
    busybox-static

# GRUB (BIOS + EFI) — available if needed for alternative builds
RUN apk add --no-cache \
    grub \
    grub-bios \
    grub-efi \
    efibootmgr

WORKDIR /work

CMD ["/bin/bash"]
