# Pinned reference toolchain for the rev-8.0.0 acceptance oracle.
#
# This image exists for one purpose: regenerating and verifying
# fixtures/strap-beam-8.0.0/. The running application has no OpenSCAD
# dependency at all -- see docs/ENVIRONMENT.md section 8.2. Confining OpenSCAD
# here is why the host's package version cannot drift into the oracle.
#
# Do not add anything to this image. Its value is that it contains nothing else.

FROM debian:12-slim

RUN apt-get update \
 && apt-get install -y --no-install-recommends \
        openscad \
        python3 \
        git \
        ca-certificates \
 && rm -rf /var/lib/apt/lists/*

# BOSL2 at the exact commit the oracle was frozen against.
ARG BOSL2_COMMIT=92d697c2856de2fed93a33e858068589cefc2898
RUN git clone https://github.com/BelfrySCAD/BOSL2.git /BOSL2 \
 && git -C /BOSL2 checkout "${BOSL2_COMMIT}" \
 && rm -rf /BOSL2/.git

# The generators use `include <BOSL2/std.scad>`; OpenSCAD resolves that against
# OPENSCADPATH after trying the including file's own directory.
ENV OPENSCADPATH=/

WORKDIR /repo
CMD ["openscad", "--version"]
