Bootstrap: docker
From: debian:trixie

%post
    set -e
    export DEBIAN_FRONTEND=noninteractive

    echo "deb http://deb.debian.org/debian trixie-backports main" \
        > /etc/apt/sources.list.d/trixie-backports.list

    apt-get update
    apt-get install -t trixie-backports -y --no-install-recommends \
        bash \
        dbus-bin \
        bornagain

    dbus-uuidgen > /etc/machine-id

    apt-get clean
    rm -rf /var/lib/apt/lists/*

%environment
    export LC_ALL=C
    export LANG=C

%runscript
    exec bornagain "$@"

%help
    Container based on debian trixie

    Default command:
        bornagain

    Executables:
        bornagain

    Usage:
        apptainer run bornagain.sif [options]

%labels
    Author="GRADES"
    Institution="Synchrotron SOLEIL"
    Version="debian-trixie"
    System="debian:trixie-backports"
    Packages="bornagain"
    Entrypoint="bornagain"
