MCPcopy Index your code
hub / github.com/docker/cli

github.com/docker/cli @v29.6.1

repository ↗ · DeepWiki ↗ · release v29.6.1 ↗ · Ask this repo → · + Follow
4,556 symbols 18,262 edges 708 files 1,523 documented · 33% 58 cross-repo links updated 3d ago★ 5,945569 open issues
README

Docker CLI

PkgGoDev Build Status Test Status Go Report Card OpenSSF Scorecard Codecov

About

This repository is the home of the Docker CLI.

Development

docker/cli is developed using Docker.

Build CLI from source:

docker buildx bake

Build binaries for all supported platforms:

docker buildx bake cross

Build for a specific platform:

docker buildx bake --set binary.platform=linux/arm64 

Build dynamic binary for glibc or musl:

USE_GLIBC=1 docker buildx bake dynbinary 

Run all linting:

docker buildx bake lint shellcheck

Run test:

docker buildx bake test

Run the unit test:

$ make -f docker.Makefile test-unit

Run the full test suite:

$ make -f docker.Makefile test

List all the available targets:

make help

In-container development environment

Start an interactive development environment:

make shell

Legal

Brought to you courtesy of our legal counsel. For more context, see the NOTICE document in this repo.

Use and transfer of Docker may be subject to certain restrictions by the United States and other governments.

It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.

For more information, see https://www.bis.doc.gov

Licensing

docker/cli is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Extension points exported contracts — how you extend this code

APIClientProvider (Interface)
APIClientProvider provides a method to get a [client.APIClient], initializing it if needed. It's a smaller interface th [4 …
cli/command/completion/functions.go
Lister (Interface)
Lister provides listing of contexts [4 implementers]
cli/context/store/store.go
Provider (Interface)
Provider defines an interface for providing the CLI config. [4 implementers]
cli/config/config.go
Streams (Interface)
Streams is an interface which exposes the standard input and output streams. Same interface as [github.com/docker/cli/c [3 …
cmd/docker-trust/internal/trust/trust_push.go
RegistryClient (Interface)
RegistryClient is a client used to communicate with a Docker distribution registry [2 implementers]
internal/registryclient/client.go
Store (Interface)
Store manages local storage of image distribution manifests
cli/manifest/store/store.go
LookupValue (FuncType)
LookupValue is a function which maps from variable names to values. Returns the value as a string and a bool indicating
cli/compose/interpolation/interpolation.go
OAuthAPI (Interface)
(no doc) [2 implementers]
internal/oauth/api/api.go

Core symbols most depended-on inside this repo

String
called by 442
internal/tui/output.go
SetArgs
called by 271
cli/cobra.go
Out
called by 261
cmd/docker-trust/internal/trust/trust_push.go
SetOut
called by 195
cmd/docker-trust/internal/test/cli.go
Client
called by 181
cli/command/completion/functions.go
OutBuffer
called by 180
cmd/docker-trust/internal/test/cli.go
SetErr
called by 167
cmd/docker-trust/internal/test/cli.go
Contains
called by 163
cli/command/formatter/formatter.go

Shape

Function 2,755
Method 1,199
Struct 494
TypeAlias 47
Interface 38
FuncType 23

Languages

Go100%

Modules by API surface

cli/command/service/formatter.go87 symbols
cli/compose/loader/loader_test.go69 symbols
cli/compose/types/types.go66 symbols
cmd/docker-trust/internal/test/notary/client.go64 symbols
cli/command/service/opts.go61 symbols
opts/opts.go53 symbols
cli/command/service/update_test.go47 symbols
cli/context/store/store.go45 symbols
cli/command/cli.go45 symbols
cli/compose/loader/loader.go43 symbols
cli/command/node/formatter.go43 symbols
cli/command/service/update.go39 symbols

Dependencies from manifests, versioned

github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/beorn7/perksv1.0.1 · 1×
github.com/cespare/xxhash/v2v2.3.0 · 1×
github.com/clipperhouse/uax29/v2v2.2.0 · 1×
github.com/containerd/errdefsv1.0.0 · 1×
github.com/containerd/errdefs/pkgv0.3.0 · 1×
github.com/containerd/logv0.1.0 · 1×
github.com/containerd/platformsv1.0.0-rc.2 · 1×
github.com/distribution/referencev0.6.0 · 1×
github.com/docker/cliv29.4.0+incompatible · 1×

For agents

$ claude mcp add cli \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact