Files
docker-agent/pkg/evaluation/Dockerfile.custom.template
Arnaud Héritier 05c6c3a1c4 feat(eval): pin injected docker-agent image to host CLI version by default
Previously the eval harness always injected the docker-agent binary from
the rolling docker/docker-agent:edge tag, so `docker agent eval` tested
against a moving main-HEAD binary regardless of the host CLI's own
version. Default the injected image to docker/docker-agent:<version>,
matching this CLI's release version, falling back to :edge for dev/main
builds where version.Version isn't a valid semver.

Add --agent-image to override the default explicitly, including a
"none" value that skips binary injection entirely and trusts whatever
/docker-agent is already present in the base image.

Fixes part 2 of #4175.
2026-09-04 19:00:51 +00:00

13 lines
464 B
Docker

# syntax=docker/dockerfile:1
FROM {{.BaseImage}}
LABEL "io.docker.agent.evals.image"="custom"
{{if .AgentImage}}COPY --from={{.AgentImage}} /docker-agent /
{{end}}RUN printf '#!/usr/bin/env sh\nset -euo pipefail\nexec "$@"\n' > /run.sh && chmod +x /run.sh
WORKDIR /working_dir
ENV TELEMETRY_ENABLED=false
ENV DOCKER_AGENT_HIDE_TELEMETRY_BANNER=1
ENTRYPOINT ["/run.sh", "/docker-agent", "run", "--exec", "--yolo", "--json"]
{{if .CopyWorkingDir}}COPY . ./
{{end}}