mirror of
https://github.com/docker/docker-agent.git
synced 2026-11-04 10:02:15 +00:00
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.
13 lines
464 B
Docker
13 lines
464 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM alpine:latest
|
|
LABEL "io.docker.agent.evals.image"="default"
|
|
{{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}}
|