2021-09-26 18:01:38 +02:00
|
|
|
# Docker CLI
|
2017-05-03 13:27:10 -07:00
|
|
|
|
2024-10-12 22:09:42 +02:00
|
|
|
[](https://pkg.go.dev/github.com/docker/cli)
|
2023-01-13 19:15:36 +01:00
|
|
|
[](https://github.com/docker/cli/actions?query=workflow%3Abuild)
|
|
|
|
[](https://github.com/docker/cli/actions?query=workflow%3Atest)
|
2021-09-26 18:01:38 +02:00
|
|
|
[](https://goreportcard.com/report/github.com/docker/cli)
|
2024-10-12 22:09:42 +02:00
|
|
|
[](https://scorecard.dev/viewer/?uri=github.com/docker/cli)
|
2023-01-13 19:15:36 +01:00
|
|
|
[](https://codecov.io/gh/docker/cli)
|
2021-09-26 18:01:38 +02:00
|
|
|
|
|
|
|
## About
|
2017-04-17 17:49:33 -04:00
|
|
|
|
2023-11-28 10:23:11 +01:00
|
|
|
This repository is the home of the Docker CLI.
|
2017-04-17 17:49:33 -04:00
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
## Development
|
2017-04-25 09:57:06 -07:00
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
`docker/cli` is developed using Docker.
|
2017-04-25 09:57:06 -07:00
|
|
|
|
2021-03-05 14:20:02 -08:00
|
|
|
Build CLI from source:
|
2017-04-25 09:57:06 -07:00
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
```shell
|
|
|
|
docker buildx bake
|
2017-04-25 09:57:06 -07:00
|
|
|
```
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
Build binaries for all supported platforms:
|
2017-04-25 09:57:06 -07:00
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
```shell
|
|
|
|
docker buildx bake cross
|
2017-04-25 09:57:06 -07:00
|
|
|
```
|
|
|
|
|
2021-03-05 14:20:02 -08:00
|
|
|
Build for a specific platform:
|
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
```shell
|
|
|
|
docker buildx bake --set binary.platform=linux/arm64
|
2021-03-05 14:20:02 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
Build dynamic binary for glibc or musl:
|
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
```shell
|
|
|
|
USE_GLIBC=1 docker buildx bake dynbinary
|
2021-03-05 14:20:02 -08:00
|
|
|
```
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
Run all linting:
|
2017-04-25 09:57:06 -07:00
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
```shell
|
|
|
|
docker buildx bake lint shellcheck
|
2017-04-25 09:57:06 -07:00
|
|
|
```
|
|
|
|
|
2021-12-07 14:50:16 +01:00
|
|
|
Run test:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
docker buildx bake test
|
|
|
|
```
|
|
|
|
|
2017-07-19 16:44:39 +01:00
|
|
|
List all the available targets:
|
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
```shell
|
|
|
|
make help
|
2017-07-19 16:44:39 +01:00
|
|
|
```
|
|
|
|
|
2017-04-25 09:57:06 -07:00
|
|
|
### In-container development environment
|
|
|
|
|
2017-05-14 13:24:10 -04:00
|
|
|
Start an interactive development environment:
|
2017-04-25 09:57:06 -07:00
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
```shell
|
|
|
|
make -f docker.Makefile shell
|
2017-04-25 09:57:06 -07:00
|
|
|
```
|
|
|
|
|
2021-09-26 18:01:38 +02:00
|
|
|
## Legal
|
|
|
|
|
2017-04-17 17:49:33 -04:00
|
|
|
*Brought to you courtesy of our legal counsel. For more context,
|
2024-04-26 13:16:51 -05: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 13:16:51 -05:00
|
|
|
For more information, see https://www.bis.doc.gov
|
2017-04-17 17:49:33 -04:00
|
|
|
|
2021-09-26 18:01:38 +02: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.
|