## Dockerfile for the Lily ASE'26 artifact.

FROM plumtrie/rosa:0.6.0-rc.2

LABEL maintainer="dimitri.kokkonis@cea.fr"
LABEL description="Artifact Docker image for the paper \"Not In My Git Yard: Catching Backdoors at Commit and Release Time\""

# Install dependencies for ROSARUM programs.
RUN apt-get update && apt-get install -y autoconf automake libtool libsqlite3-dev make re2c tcl \
    zlib1g-dev autogen build-essential libasound2-dev libflac-dev libogg-dev libvorbis-dev \
    libopus-dev libmp3lame-dev libmpg123-dev pkg-config python3 libreadline-dev rcs tcl-dev tk-dev \
    libnss3-dev libboost-dev liblcms2-dev libopenjp2-7-dev parallel zip libcap-dev
# Install LaTeX suite to reproduce part of the paper.
RUN apt-get update && apt-get install -y texlive-publishers texlive-science texlive-fonts-extra \
    latexmk
# Install Python dependencies.
RUN pip3 install --break-system-packages unidiff==0.7.5 tomlkit==0.13.2

WORKDIR /root
COPY . ./artifact

ENV COLORTERM=truecolor
ENV DISPLAY_CALIBRATION_RUNS=1
ENV DISPLAY_RUNS=1
ENV NO_TUI=1
ENV PACKAGE_EXPERIMENT=1

# Set up experiment infrastructure.
RUN /root/artifact/tools/startup/startup.sh
# Set up easy access to experiment files.
RUN ln -s /root/artifact/tools/experiment-helpers /root/experiments
# Set up directory to contain all experiment artifacts.
RUN mkdir -p /root/evaluation/
# Set up directory for logs.
RUN mkdir -p /root/logs/
# Just in case the user did not set up /root/scratch, create it here.
RUN mkdir -p /root/scratch/

WORKDIR /root/artifact/
CMD ["/root/artifact/start.sh"]
