2021-09-26 12:01:38 -04:00
|
|
|
# Docker CLI
|
2017-05-03 16:27:10 -04:00
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
[![PkgGoDev](https://img.shields.io/badge/go.dev-docs-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/docker/cli)
|
2023-01-13 13:15:36 -05:00
|
|
|
[![Build Status](https://img.shields.io/github/actions/workflow/status/docker/cli/build.yml?branch=master&label=build&logo=github)](https://github.com/docker/cli/actions?query=workflow%3Abuild)
|
|
|
|
[![Test Status](https://img.shields.io/github/actions/workflow/status/docker/cli/test.yml?branch=master&label=test&logo=github)](https://github.com/docker/cli/actions?query=workflow%3Atest)
|
2021-09-26 12:01:38 -04:00
|
|
|
[![Go Report Card](https://goreportcard.com/badge/github.com/docker/cli)](https://goreportcard.com/report/github.com/docker/cli)
|
2023-01-13 13:15:36 -05:00
|
|
|
[![Codecov](https://img.shields.io/codecov/c/github/docker/cli?logo=codecov)](https://codecov.io/gh/docker/cli)
|
2021-09-26 12:01:38 -04:00
|
|
|
|
|
|
|
## About
|
2017-04-17 17:49:33 -04:00
|
|
|
|
2023-11-28 04:23:11 -05:00
|
|
|
This repository is the home of the Docker CLI.
|
2017-04-17 17:49:33 -04:00
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
## Development
|
2017-04-25 12:57:06 -04:00
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
`docker/cli` is developed using Docker.
|
2017-04-25 12:57:06 -04:00
|
|
|
|
2021-03-05 17:20:02 -05:00
|
|
|
Build CLI from source:
|
2017-04-25 12:57:06 -04:00
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
```shell
|
|
|
|
docker buildx bake
|
2017-04-25 12:57:06 -04:00
|
|
|
```
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
Build binaries for all supported platforms:
|
2017-04-25 12:57:06 -04:00
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
```shell
|
|
|
|
docker buildx bake cross
|
2017-04-25 12:57:06 -04:00
|
|
|
```
|
|
|
|
|
2021-03-05 17:20:02 -05:00
|
|
|
Build for a specific platform:
|
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
```shell
|
|
|
|
docker buildx bake --set binary.platform=linux/arm64
|
2021-03-05 17:20:02 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
Build dynamic binary for glibc or musl:
|
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
```shell
|
|
|
|
USE_GLIBC=1 docker buildx bake dynbinary
|
2021-03-05 17:20:02 -05:00
|
|
|
```
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
Run all linting:
|
2017-04-25 12:57:06 -04:00
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
```shell
|
|
|
|
docker buildx bake lint shellcheck
|
2017-04-25 12:57:06 -04:00
|
|
|
```
|
|
|
|
|
2021-12-07 08:50:16 -05:00
|
|
|
Run test:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker buildx bake test
|
|
|
|
```
|
|
|
|
|
2017-07-19 11:44:39 -04:00
|
|
|
List all the available targets:
|
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
```shell
|
|
|
|
make help
|
2017-07-19 11:44:39 -04:00
|
|
|
```
|
|
|
|
|
2017-04-25 12:57:06 -04:00
|
|
|
### In-container development environment
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
Start an interactive development environment:
|
2017-04-25 12:57:06 -04:00
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
```shell
|
|
|
|
make -f docker.Makefile shell
|
2017-04-25 12:57:06 -04:00
|
|
|
```
|
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
## Legal
|
|
|
|
|
2017-04-17 17:49:33 -04:00
|
|
|
*Brought to you courtesy of our legal counsel. For more context,
|
2024-04-26 14:16:51 -04:00
|
|
|
see the [NOTICE](https://github.com/docker/cli/blob/master/NOTICE) document in this repo.*
|
2017-04-17 17:49:33 -04:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2024-04-26 14:16:51 -04:00
|
|
|
For more information, see https://www.bis.doc.gov
|
2017-04-17 17:49:33 -04:00
|
|
|
|
2021-09-26 12:01:38 -04:00
|
|
|
## Licensing
|
|
|
|
|
2017-04-17 17:49:33 -04:00
|
|
|
docker/cli is licensed under the Apache License, Version 2.0. See
|
|
|
|
[LICENSE](https://github.com/docker/docker/blob/master/LICENSE) for the full
|
|
|
|
license text.
|