FROM debian:trixie

# Install core system tools
RUN apt-get update && apt-get install -y \
    git \
    curl \
    wget \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Install image building dependencies
COPY ./package-requires.txt .
RUN apt-get update && grep -vE '^#' package-requires.txt | xargs apt-get install -y && rm -f package-requires.txt && apt-get clean

# Copy our simplified bootc-image-builder script
COPY scripts/bootc-image-builder.sh /usr/bin/bootc-image-builder
RUN chmod +x /usr/bin/bootc-image-builder

# Copy data files
COPY bib/data /usr/share/bootc-image-builder

ENTRYPOINT ["/usr/bin/bootc-image-builder"]
VOLUME /output
WORKDIR /output
VOLUME /store
VOLUME /var/lib/containers/storage

LABEL description="Simplified Debian bootc-image-builder for container-to-disk conversion"
LABEL io.k8s.description="Simplified Debian bootc-image-builder for container-to-disk conversion"
LABEL io.k8s.display-name="Debian Bootc Image Builder (Simplified)"
LABEL io.openshift.tags="base debian-trixie"
LABEL summary="A simplified container to create disk-images from bootc container inputs using native Debian tools"
