# Use the proven shared agent harness, with this lineage's pinned toolchain.
ARG BASE_IMAGE=registry.abot.at/666666666666/sola-iterator/rust:b20260909114425
FROM ${BASE_IMAGE}
USER root
RUN dnf install -y rsync && dnf clean all
RUN rustup toolchain install 1.98.1 --profile minimal && rustup default 1.98.1
ENV CARGO_BUILD_JOBS=4 CARGO_TARGET_DIR=/warm/rust-target
COPY Cargo.toml Cargo.lock /warm/seed/
RUN rm -rf /warm/seed/src && mkdir -p /warm/seed/src \
 && printf 'fn main() {}\n' > /warm/seed/src/main.rs \
 && cargo build --profile iterate --locked --manifest-path /warm/seed/Cargo.toml
COPY src /warm/seed/src
RUN touch /warm/seed/src/main.rs && cargo build --profile iterate --locked --manifest-path /warm/seed/Cargo.toml \
 && chmod -R a+rwX /warm /usr/local/cargo/registry
# Retain the exact paths and source timestamps used when warming the target.
WORKDIR /var/task
