Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Docker Buildx

$ docker-buildx Official Med Risk
Docker · Cloud & Infra · Apache-2.0 · macos / linux / windows

Docker Buildx (docker-buildx / docker buildx) extends Docker with BuildKit for multi-platform OCI builds, cache mounts, SBOM/provenance attestations, and bake HCL/JSON targets. It writes structured build digests via --metadata-file and inspects remote manifests via imagetools inspect --raw.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install docker-buildx
CLI vs MCP Decision CLI Preferred vs MCP

docker buildx handles local BuildKit builders, --metadata-file JSON outputs, and multi-arch registry pushes directly on the host.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Emits JSON via --metadata-file, --progress=rawjson, and imagetools inspect --raw, though buildx ls itself outputs text tables.

  • --metadata-file writes build result descriptors as JSON
  • --progress=plain / rawjson avoids TTY spinner redraws
Trust & Safety 20 / 25

Remote pushes require explicit --push (or --output type=registry), keeping default local builds contained.

  • Requires explicit --push flag to publish to remote registries
  • Builds execute arbitrary RUN steps defined in Dockerfiles
Setup & Portability 14 / 15

Available across macOS, Linux, and Windows via Homebrew, Docker Desktop, and GitHub Releases.

  • Cross-platform binary and Docker CLI plugin
Utility & Efficiency 14 / 15

First-class multi-arch builds, BuildKit layer caching, bake orchestration, and attestation generation.

  • Unified multi-platform build, bake, and imagetools workflow
Maintenance & Lineage 9 / 10

Official Docker Buildx repository (docker/buildx) licensed under Apache-2.0.

  • Official docker/buildx repo
Docs & Verifiability 8 / 10

Detailed CLI reference and examples at docs.docker.com.

  • Official reference at docs.docker.com/reference/cli/docker/buildx/

Security, Auth & Guardrails

Auth Modes
No Auth Config File OS Keychain
Credential Storage

Reuses Docker registry auth in ~/.docker/config.json and configured Docker credential helpers.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Apache-2.0 open-source CLI; remote registry storage/egress and Docker Build Cloud usage are billed separately.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Docker Buildx Agent Rules
- Always pass `--progress=plain` (or `rawjson`) and `--metadata-file <path>` on `build` so logs and digests remain parseable.
- Never pass `--push` unless registry push is explicitly requested; prefer `--load` or `--output type=oci` for local verification.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect a remote multi-arch image manifest as raw JSON
docker buildx imagetools inspect --raw ghcr.io/org/app:latest

Fetches the raw OCI image index or manifest JSON from a remote registry without pulling layers.

List configured Buildx builder instances
docker buildx ls

Displays active BuildKit drivers, endpoints, and supported target platforms.

Controlled Writes & Previews

Build locally with plain progress and JSON metadata output
docker buildx build --progress=plain --metadata-file build-meta.json --load -t app:dev .

Builds the image into the local Docker store with non-TTY logs and writes the resulting digest/config to build-meta.json.

Strengths for Agents

  • + --metadata-file emits machine-readable JSON with exact image digests and manifest descriptors.
  • + imagetools inspect --raw reads remote multi-arch manifests without a local build.
  • + --progress=plain keeps CI and agent build logs linear and clean.

Caveats & Pitfalls

  • ! Commands like docker buildx ls do not offer a native --format json flag.
  • ! Multi-platform builds require QEMU/binfmt or a docker-container builder driver.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI