# Docker CLI

> Source repository for the Docker command-line client, written in Go and built with docker buildx bake, with cross-platform and glibc/musl build targets.

Stars: 6.1k · Language: Go · License: Apache-2.0 · Categories: Dev Tools

- Repository: https://github.com/docker/cli
- Page: https://www.trmn.sh/tools/docker-cli

## Overview

This repository is the home of the Docker CLI, the command-line client for Docker. The README covers building and developing the client itself rather than using it, so it is aimed at contributors and people who need to build the binary from source. It is a Go project (documented on pkg.go.dev) licensed under Apache 2.0.

The project is developed using Docker. `docker buildx bake` builds the CLI from source, and `docker buildx bake cross` builds binaries for all supported platforms. A single platform can be targeted with `docker buildx bake --set binary.platform=linux/arm64`. A dynamic binary linked against glibc or musl can be built with `USE_GLIBC=1 docker buildx bake dynbinary`.

Quality checks run through the same bake workflow: `docker buildx bake lint shellcheck` runs linting and `docker buildx bake test` runs tests. The Makefile wrapper `make -f docker.Makefile test-unit` runs the unit tests, and `make -f docker.Makefile test` runs the full suite. `make help` lists all available targets, and `make shell` starts an interactive in-container development environment.

## Alternatives

- [Popeye](https://www.trmn.sh/tools/popeye.md): Read-only scanner that lints live Kubernetes clusters for misconfigurations, unused resources, and over/under allocation, with console, JSON, and HTML reports. (Go, 6.5k stars)
- [Krew](https://www.trmn.sh/tools/krew.md): Package manager for kubectl plugins: discover, install, and manage plugins from a central index, similar to apt, dnf, or brew. (Go, 7.0k stars)
- [freeze](https://www.trmn.sh/tools/freeze.md): Generate PNG, SVG, and WebP images of code and terminal output with syntax highlighting and customizable styling. (Go, 4.9k stars)
- [scc](https://www.trmn.sh/tools/scc.md): Code counter written in Go that reports lines of code, comments, complexity, ULOC and COCOMO estimates across many languages, with multiple output formats. (Go, 8.9k stars)
- [reviewdog](https://www.trmn.sh/tools/reviewdog.md): Parses linter output and posts findings in changed lines as review comments on GitHub, GitLab, and Bitbucket, or filters lint results by diff locally. (Go, 9.7k stars)

---

Canonical: https://www.trmn.sh/tools/docker-cli
