1 # syntax=docker/dockerfile:12 # The mock bundle owns its whole image recipe. The generic builder stages this3 # directory beside the shared SDK workspace; nothing in docker/ or ops/ selects4 # this bundle's base, engine, binary, or pins.5 #6 # The builder image and the runtime base are pinned here, inside the bundle.7 ARG RUST_IMAGE=rust:1.99.1-bookworm@sha256:e6f2cff35d0f309acf8433b4f05878ed77092602c5065cc81801177da0bb3a9c8 ARG DEBIAN_IMAGE=debian:bookworm-slim@sha256:734a72b3d6142a71993b4bc580ca01d8ca687f77a2c422d96a961d3376b179bc9 10 FROM ${RUST_IMAGE} AS build11 WORKDIR /src12 # A bundle is its own workspace (D19). The root manifests and crates are in the13 # generic context because the bundle's path dependencies reach them. The14 # registry and target caches are BuildKit mounts, not image layers.15 COPY Cargo.toml Cargo.lock ./16 COPY crates ./crates17 COPY plugins/mock/x64-cpu ./plugins/mock/x64-cpu18 RUN --mount=type=cache,target=/usr/local/cargo/registry \19 --mount=type=cache,target=/cache/target \20 CARGO_TARGET_DIR=/cache/target \21 cargo build --locked --release \22 --manifest-path plugins/mock/x64-cpu/Cargo.toml \23 --bin inf3r-mock-x64-cpu \24 && install -D -m 0755 /cache/target/release/inf3r-mock-x64-cpu /out/inf3r-mock-x64-cpu25 26 FROM ${DEBIAN_IMAGE}27 # The image is runtime-only: the plugin and the manifest tree, no weights and28 # no compiler. /bin/sh and find stay because the generic image check runs an29 # explicit weight scan inside the image.30 RUN install -d /opt/inf3r/bin /opt/inf3r/plugins /var/lib/inf3r31 COPY plugins/mock/x64-cpu/bundle.toml plugins/mock/x64-cpu/target.toml plugins/mock/x64-cpu/BUNDLE.md \32 /opt/inf3r/plugins/mock/x64-cpu/33 COPY plugins/mock/x64-cpu/models /opt/inf3r/plugins/mock/x64-cpu/models34 COPY plugins/mock/x64-cpu/engine /opt/inf3r/plugins/mock/x64-cpu/engine35 COPY --from=build --chmod=0755 /out/inf3r-mock-x64-cpu /opt/inf3r/bin/inf3r-mock-x64-cpu36 ENV INF3R_BUNDLE_DIR=/opt/inf3r/plugins/mock/x64-cpu37 # Rootless Docker maps container root to the daemon's unprivileged host uid.38 USER 0:0