bench/Containerfile
# The pinned stock-`git` toolchain for gunnar's head-to-head bench arms.
#
# The harness design calls for a container for exactly the `gunnar.vs_git_*` arms,
# and for exactly one reason: to make the stock-`git` toolchain's presence and
# version **non-optional**. The real-git interop suites once self-skipped and
# reported green when the toolchain was absent, and that is the failure this image
# exists to prevent. Not measurement noise; a container does not remove that.
#
# Ubuntu 26.04 is the desktop's own distribution, so `apt-get install git` here yields
# the SAME package build as `/usr/bin/git` on the host (`1:2.53.0-1ubuntu1`) and
# the same glibc, so `bench/examples/nornir-bench.rs`, compiled on the host,
# runs unchanged inside.
#
# **Both** sides of every head-to-head arm run in here. Containerising only the
# stock-git side would have introduced a namespace-and-cgroup asymmetry far
# larger than the version pinning it bought; containerising both makes the
# container symmetric overhead that cancels out of every ratio. It is entered
# once per arm, outside the timed region.
#
# Build it (the arms fail loudly, by design, if it is absent):
#
# podman build -t gunnar-bench-git:2.53.0 bench/
#
# The tag is `H2H_IMAGE` in `bench/examples/nornir-bench.rs` and the version the
# arms assert is `H2H_GIT_VERSION`. Changing the pin means changing both, and it
# means every previously published `vs_git_*` row was measured against a
# different `git`, which is why the assertion is there at all.
# ubuntu:26.04 (the multi-arch index), pinned by digest so a re-tag cannot move the measured git
FROM docker.io/library/ubuntu:26.04@sha256:6a06111c3b0a8600feadb270aec771dc239bf407b25625f93f44ab00e11f4d3c
ARG GIT_VERSION=1:2.53.0-1ubuntu1
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends "git=${GIT_VERSION}" \
&& rm -rf /var/lib/apt/lists/*
RUN git --version