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.

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 & related tools

add a badge to your README

Maintain Docker CLI? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/docker-cli.svg)](https://www.trmn.sh/tools/docker-cli?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/docker-cli?utm_source=badge"><img src="https://www.trmn.sh/badge/docker-cli.svg" alt="Featured on trmn" height="20"></a>